gpt4 book ai didi

powershell - VS Code 终端中是否有当前文件或文件夹的变量?

转载 作者:行者123 更新时间:2023-12-04 15:31:02 24 4
gpt4 key购买 nike

在终端 Pane 中时,我想通过环境变量或 PowerShell 变量(首选)引用事件编辑器选项卡的文件或文件夹。像这样的东西:

ii $vsActivePath

或者

ii $vsActiveFile

这可能吗?

最佳答案

不确定这是否正是您要查找的内容,但您可以访问 vs 代码中的各种变量,例如:

${workspaceRoot} the path of the folder opened in VS Code
${workspaceRootFolderName} the name of the folder opened in VS Code without any slashes (/)
${file} the current opened file

Full details can be found here

关于powershell - VS Code 终端中是否有当前文件或文件夹的变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43592640/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com