Customize VS Code’s Integrated Terminal
Jul 10, 2023
VS code’s integrated terminal is a convenient tool for interacting via a CLI interface.
Default CLIs like zsh
for MacOS and cmd
or pwsh
for Windows are usually there by default when VS code is installed. Some CLIs like Git Bash are added automatically when installed. However, some are not. For example, when I downloaded iTerm2 on Mac, or PowerShell 7 on Windows, they did not update the CLI options for integrated terminal automatically.
Cmd+Shift+P
open the panel: Preferences: Open User settings (JSON)
For Windows:
...
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"PowerShell 5": {
"path": "${env:windir}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
}
}