![](/img/trans.png)
[英]ng serve --open not working from Powershell and VS terminal(Powershell)
[英]VS Code Open new terminal from powershell
VS代码(Windows 10)
我想从ps1脚本实现的目标:
我创建了一个PowerShell脚本,我从默认打开的终端运行。 现在我想从第一个开启一个新的终端标签。
我可以从终端激活vs代码命令快捷方式(Ctrl +`)或vs代码命令调色板(Ctrl + Shift + P)吗?
这是我如何解决我的问题。
// Create a terminal Window
const term = vscode.window.createTerminal("terminal_name");
// Write any powershell command
term.sendText("cd C:\\path\\to\\follow\\");
// Any other command
term.sendText("yarn start");
// Create a second terminal
const secTerm = vscode.window.createTerminal("second_terminal_name");
secTerm.sendText("cd C:\\another\\path\\to\\follow\\");
secTerm.sendText("py manage.py runserver");
// and so one
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.