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

Improved variables support #45

Open arikw opened 4 years ago

arikw commented 4 years ago

I want to start a command in a specific workspace folder.

VSCode configuration files support variables and, for example, you can start a terminal in a workspace folder called "proj2" like so:

{
    "terminal.integrated.cwd": "${workspaceFolder:proj2}"
}

If Terminals would support variables in the cwd option, it would be possible to achieve my goal by adding "cwd": "${workspaceFolder:proj2}" to the terminal's configuration

Also, I want to inherit the PATH env variable I defined in the global env configuration and extend it in the terminal's configuration. For example:

{
    "env": { // Global environment variables
        "PATH": "${workspaceFolder:proj2}/scripts;${env:PATH};"
    },
    "terminals": [
        {
            "env": {
                "PATH": "${global:PATH};/more/path"
            }
        }
    ]
}