【发布时间】:2019-02-20 19:48:56
【问题描述】:
我想知道是否有办法在 Sublime Text 3 中运行构建,以便它在 Powershell 而不是 CMD 中输出。
{
"cmd": ["gcc", "${file}", "-o", "${file_base_name}.exe"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"shell": true,
"variants":
[
{
"name": "Run",
"cmd": ["start", "cmd", "/k", "${file_path}/${file_base_name}.exe"],
"shell": true
}
]
}
这是我在网上找到的代码,它将使用 MinGW 作为编译器,并允许您按 Ctrl + B 在 ST3 中构建 C++ 程序。执行此操作时,输出将转到 CMD 提示符。有没有办法让输出转到 Powershell?
【问题讨论】:
-
将
cmd和/k更改为 PowerShell 等效项(powershell和-NoExit -Command可能会起作用)。
标签: c++ powershell sublimetext3