You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Open New Command Prompt should honor %COMSPEC% environment variable on Windows #597
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesverifiedVerification succeeded
On Windows, The 'Open New Command Prompt' command should lookup the %comspec% environment variable instead of using hard-coded 'cmd.exe'.
This enables alternate interpreters/shells to be started - such as TCCLE.
There may be similar things for Linux/OSX.
I've done some tests and I can get bash to work when supplying cp.spawn('cmd.exe', ['/c', 'start', '/wait', 'bash']).
(Replacing bash with powershell works for too. Also omitting bash leaves cmd.exe to work as default)
This is the test script code I used to get this working for bash.
I think we can keep the %comspec% environment variable as is and add a new user\workspace setting like "terminal.launchCommand" for spawning new terminals that are requested by the user.
bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesverifiedVerification succeeded
Activity
joaomoreno commentedon Nov 25, 2015
Want to contribute a PR?
krizzdewizz commentedon Nov 27, 2015
Just sent my first PR ever. Hope everything is fine.
joaomoreno commentedon Nov 27, 2015
Awesome, I'll take a look as soon as possible! Thanks!
pflannery commentedon Feb 26, 2016
Christian Oetterli (@krizzdewizz) João Moreno (@joaomoreno)
I have an issue when setting comspec to use
bash.The issue is that the forced arguments passed to spawn affect bash in a different way and closes the process immediately.
Source here -> https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/execution/electron-browser/terminalService.ts#L27
Looking at the code I cant see how this would work for other terminals as it's trying to pass
/c start /waitas command arguments which other terminals may or may not support.I've done some tests and I can get bash to work when supplying
cp.spawn('cmd.exe', ['/c', 'start', '/wait', 'bash']).(Replacing
bashwithpowershellworks for too. Also omitting bash leavescmd.exeto work as default)This is the test script code I used to get this working for bash.
I think we should also add the error handling code as it's not present
pflannery commentedon Feb 26, 2016
I think we can keep the %comspec% environment variable as is and add a new user\workspace setting like "terminal.launchCommand" for spawning new terminals that are requested by the user.