将CMD命令转换为VS代码命令 [英] Convert a CMD command to a VS Code command
问题描述
我想将此cmd命令转换为vs代码命令。 (我需要 this )
I want to convert this cmd command to a vs code command. (I need it for this)
start ${fileDirname}\${fileBasenameNoExtension}.exe
我尝试了命令运行程序扩展,但它没有使vs代码命令给我。
有人可以给我解决方案吗?谢谢。
I tried command-runner extension but it's not making a vs code command for me.
Can someone give me a solution? Thanks.
推荐答案
开始$ {fileDirname} \ $ {fileBasenameNoExtension} .exe
是一个shell命令,因此您可以使用以下命令运行它:
start ${fileDirname}\${fileBasenameNoExtension}.exe
is a shell command, so you could run it with:
"multiCommand.commands": [
{
"command": "multiCommand.build_and_run",
"sequence": [
"workbench.action.tasks.build",
// "\"start ${fileDirname}\\${fileBasenameNoExtension}.exe\"",
{
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "start ${fileDirname}\\${fileBasenameNoExtension}.exe"
}
}
]
}
]
我不知道该顺序是否一定要保证是顺序的。您必须进行测试-如有必要,您始终可以添加 interval
选项。还有一些外壳运行程序扩展可以插入多命令
中。 多命令
不能单独运行没有 sendSequence
或通过另一个shell运行程序扩展程序的命令的shell命令。
I don't know that that sequence is necessarily guaranteed to be sequential though. You'll have to test that - you could always add the interval
option if necessary. There are also shell runner extensions that could be plugged into multi-command
. multi-command
can't just run shell commands by itself without sendSequence
or through another shell runner extension's commands.
这篇关于将CMD命令转换为VS代码命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!