The place where random ideas get written down and lost in time.
2023-01-29 - VSCode and Terminal and Cygwin
Category DEVVSCode > Terminal > use “v” icon > Terminal Settings
or
VSCode > File > Preferences > Settings (Ctrl + ,)
Scroll to Features > Terminal > Integrated > Automation Profile: Windows (or Linux)
“Edit in settings.json” → creates C:\Users\%USER%\AppData\Roaming\Code\User\settings.json
In the JSON section:
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
replace by:
"terminal.integrated.shell.windows": "C:\\cygwin64\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
"--login",
"-i"
],
"terminal.integrated.env.windows": {
"CHERE_INVOKING": "1"
},
Try it with Ctrl-` (or Terminal > New)
Also copy that in the workspace profile rather than the user-wide profile.
Note that this method is deprecated as now there are “terminal profiles” but it still works.