Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select a different type of command shell in the Visual Studio Code integrated terminal

I looked at this link which talks about changing the default command shell in the integrated terminal of Visual Studio Code. I was able to change it to Git Bash using the below setting in the settings.json file. You can open settings.json file by pressing the Ctrl + , or from FilePreferencesSettings menu:

{
   "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
}

There is a + sign in the integrated terminal with the help of which you can have multiple terminals running parallelly as shown in the screenshot below:

Enter image description here

I want to load a Git Bash shell in terminal # 1, Windows PowerShell in terminal # 2, and so on. What is the relevant configuration to achieve it?

like image 584
RBT Avatar asked Jun 08 '17 02:06

RBT


People also ask

How do you run a shell command in VS Code?

Launching from the command line# You can also run VS Code from the terminal by typing 'code' after adding it to the path: Launch VS Code. Open the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.

How do you type commands in VS Code?

The most important key combination to know is Ctrl+Shift+P, which brings up the Command Palette. From here, you have access to all of the functionality of VS Code, including keyboard shortcuts for the most common operations. The Command Palette provides access to many commands.

What is shell integration in VS Code?

Visual Studio Code has the ability to integrate with common shells, allowing the terminal to understand more about what's actually happening inside the shell. This additional information enables some useful features such as working directory detection and command detection, decorations, and navigation.


1 Answers

No need to keep changing your default terminal setting. Install the Shell Launcher extension, configure it, and then ctrl-shift-t to select which terminal you want to open inside of VS Code.

Screenshot of Shell Launcher and settings

like image 133
marchica Avatar answered Sep 28 '22 08:09

marchica