VSCode - 从 cli 远程打开

VSCode - open remote from cli

我一直在使用新的 VS Code 远程功能,它非常棒。我想知道是否可以从 cli 打开特定的 ssh 主机/文件夹。这样我就可以编写我的开发环境(vm、vs-code 等)的旋转脚本!

我查看了 code-insiders --help,但看不到任何允许我执行此操作的内容。这可能是一个功能请求,但我想我会先 post 在 github 存储库上这样做之前。

谢谢!

运行 这在你的 cmd 或 PowerShell 上

code --remote ssh-remote+<remoteHost> <remotePath>

来源:https://github.com/microsoft/vscode-remote-release/issues/656#issuecomment-584209378