extraterm
extraterm copied to clipboard
[Feature request] Instead of "open terminal window here", possible to open file browser automatically to the directory in which you are currently in the terminal?
Hey there,
I am not even sure if this is possible, but there have been numerous occasions in which it would be pretty nice to be able to open the file explorer directly to the location in which I am currently in my terminal. Is this something that can be done? (Perfectly fine if it requires the plugin/extraterm commands installed). Either an actual terminal command, right click menu item, or from the command pallet?
Thanks, -MH
This is the kind of thing I want the plugin API to be powerful enough to support. This is a good feature suggestion too.
@MostHated - I'd love to see it implemented as well. And it's good to see that there's a medium priority for this issue. In the meanwhile you could add something like this to your .zshrc (assuming you use zsh):
precmd() { eval "$PROMPT_COMMAND" }
PROMPT_COMMAND='pwd > "${HOME}/.cwd"'
[[ -f "${HOME}/.cwd" ]] && cd "$(< ${HOME}/.cwd)"
After every command it saves the current working directory in a file and whenever you open a new tab, the emulator will fetch the path from this file. It's a little hacky, but I feel like it's a decent workaround until we get native support :)
@MostHated I use xdg-open
for this on Linux-esque systems. (On macOS, just use open .
)
To install if not already installed:
sudo apt install xdg-utils
In my .zshrc, I have the following alias:
alias open='xdg-open'
And so I just do open .
, same as on macOS. (I don’t entirely remember but I think you can do the same thing on Windows by running explorer.exe).
Not exactly what you asked for but hope it helps in the interim :)