Visual Studio Code - 在 Windows 的“选择默认外壳"列表中添加选项? [英] Visual Studio Code - Add option(s) in 'select default shell' list on Windows?

查看:17
本文介绍了Visual Studio Code - 在 Windows 的“选择默认外壳"列表中添加选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 VSCode 终端中使用 各种 shell,例如.Git Bash.我可以使用 terminal.integrated.shell.windowssettings.json 中设置它,但是如果我随后选择 CMD 作为默认值,该设置将被替换.如果我将另一个 terminal.integrated.shell.windows 添加到 bash.exe,我会被 bash 卡住,无法更改默认 shell,如果 VSCode 只替换第一个设置,但读取最后一个相同的设置值.

I want to use various shells in VSCode terminal, eg. Git Bash. I can set it in settings.json with terminal.integrated.shell.windows, but if I select CMD as default subsequently, that setting will get replaced. And if I add another terminal.integrated.shell.windows to bash.exe, I'm stuck with bash, can't change default shell, seems logical anyway if VSCode only replaces the 1st setting, but read the last same setting value.

问题是选择默认shell"列表中不存在Bash,我的问题是如何添加?

The problem is there's no Bash existed in the "select default shell" list, and my question is how to add that?

我已经为 Windows 安装了最新 (2.22.0) 64 位版本的 Git,并希望它能为此添加必要的 env/reg 等,但没有.

I have installed latest (2.22.0) 64-bit version of Git for Windows, and hoped it would add the necessary env/reg etc for that, but no.

尽管这应该是独立于版本的,但这是我的 VSCode 关于:

Even though this should be version independent, nevertheless here's my VSCode About:

版本:1.35.1(用户设置)

Version: 1.35.1 (user setup)

提交:c7d83e57cd18f18026a8162d042843bda1bcf21f

Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f

日期:2019-06-12T14:30:02.622Z

Date: 2019-06-12T14:30:02.622Z

电子:3.1.8

铬:66.0.3359.181

Chrome: 66.0.3359.181

Node.js: 10.2.0

Node.js: 10.2.0

V8:6.6.346.32

V8: 6.6.346.32

操作系统:Windows_NT x64 10.0.10240

OS: Windows_NT x64 10.0.10240

请.我知道有类似的问题,但它们并没有真正解决我的问题.但是,我的问题的正确答案将解决他们的问题.

Please. I know there are similar questions, but they don't really solve my problem. However, the correct answer to my question will solve theirs.

推荐答案

如果您的问题是如何向 Terminal:Select Default Shell 添加更多终端 shell,我认为这不太可能.

If your question is how to add more terminal shells to Terminal:Select Default Shell, I dont think thats easily possible.

但是您可以使用 Shell Launcher 插件添加更多 shell 并在您的集成终端中启动它们.下面是我将 Julia 添加到列表中的屏幕截图.

But you can use Shell Launcher plugin to add more shells and launch them in your integrated terminal. Below is a screen shot where I added Julia to the list.

  1. 转到扩展并添加 Shell 启动器.

转到设置 (Ctrl+,) 并搜索 Shell Launcher 并针对您的平台进行编辑.

Go to settings(Ctrl+,) and search for Shell Launcher and edit for your platform.

将您的外壳添加到列表中

Add your shell to the list

您可以通过 F1(Command Pallete) -> Shell Launcher 启动它

You can launch this by F1(Command Pallete) -> Shell Launcher

这篇关于Visual Studio Code - 在 Windows 的“选择默认外壳"列表中添加选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆