问题
I'm trying to set variable before start the Integrated Terminal
User Setting:
{
"terminal.integrated.env.windows": {
"foo": "bar"
}
}
Then View > Integrated Terminal
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:\bar> echo $foo
PS C:\bar>
It's seem not work, It's bug or I'm wrong?
VSCode Version: 1.16.1
PS: Already seem Set global $PATH environment variable in VS Code
回答1:
Finally, yume-chan answer by question in Ref: https://github.com/Microsoft/vscode/issues/34420#issuecomment-329705397
It's should be echo $Env:foo
instead of echo $foo
来源:https://stackoverflow.com/questions/46232602/terminal-integrated-env-windows-for-integrated-terminal