-
-
Notifications
You must be signed in to change notification settings - Fork 6
Support cwd in replace pattern #1
Comments
@kbjr this would be awesome if you could get that implemented, it cant be impossible, if its a node thing, you could use |
The problem is that the "currently navigated to directory" is not the same as the cwd of the process. The shell itself keeps track of where you are in whatever way it deems to do that. Which means if there is a solution, it's likely different from shell to shell, and possibly just can't be done for some shells (powershell seems particularly opposed to letting me at that info). |
@kbjr Interesting, perhaps this is a bug to raise in the main terminus repository or have you done this already? |
Current working directory can be retrieved with |
Yeah, definitely still doesn't work on powershell (doesn't seem to work on WSL ubuntu either), but I'll leave the flag in there on the beta branch for now, and hopefully it works for other platforms (don't have a mac on hand to test, unfortunately). |
Yep - macOS and Linux work perfectly, but Windows doesn't expose other processes' CWD, so Terminus relies on path being either printed with the prompt, or reported via ESC 1337: https://github.com/Eugeny/terminus/wiki/CWD-reporting |
I dug around for quite some time looking at wmic and handle and couldn't find a way to get this info on a Windows system, so it may not be an easy thing to accomplish cross-platform.
But having the ability to add a
\d
escape for current directory would be really nice.The text was updated successfully, but these errors were encountered: