如何在 Visual Studio Code 生成任务参数中将反斜杠替换为正斜杠。
我尝试在 Bash 命令中使用反斜杠,但控制台只是删除了斜杠。
"command": "xxxxxxxx.exe",
"type": "shell",
"args": [
"--dir=${workspaceFolder}",
]
在控制台中它似乎是:
> Executing task: xxxxxxxx.exe --dir=C:UsersUserDesktopProject
但我希望它是:
> Executing task: xxxxxxxx.exe --dir=C:/Users/User/Desktop/Project/
使用 bash 内置的东西${variable//string/substitution}
:
"command": "xxxxxxxx.exe",
"type": "shell",
"args": [
"--dir=${workspaceFolder//\\/\/}",
]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)