fabiospampinato / vscode-terminals

An extension for setting-up multiple terminals at once, or just running some commands.
MIT License
121 stars 19 forks source link

Implement "relativeFileDirname" substitution variable #31

Open slavdok opened 4 years ago

slavdok commented 4 years ago

There is a [relativeFile] variable, but I need a [relativeDirname] that would contain the directory path (without file), relative to the workspace. I tried obtaining this with a combination of all other variables, but couldn't.

I am trying to create a command that would switch my terminal (remote SSH) to the directory of the open file

fabiospampinato commented 4 years ago

The idea is to provide basically the same tokens as VSCode's main, at the time I implemented them there wasn't a token for what you're describing, but it looks like they added relativeFileDirname at some point, which does exactly what you're describing, so we should implement it as well.

PR welcome 👍