terminal.integrated.env.windows for Integrated Terminal

拥有回忆 提交于 2021-02-08 08:21:42

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!