wtj*_*nes 6 powershell visual-studio-code
在终端窗格中时,我想通过环境变量或PowerShell变量(首选)引用活动编辑器选项卡的文件或文件夹。像这样:
ii $vsActivePath
要么
ii $vsActiveFile
这可能吗?
不确定这是否正是您正在寻找的,但您可以访问 VS Code 中的各种变量,例如:
${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
Run Code Online (Sandbox Code Playgroud)