-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open New Command Prompt should honor %COMSPEC% environment variable on Windows #597
Comments
Want to contribute a PR? |
Just sent my first PR ever. Hope everything is fine. |
Awesome, I'll take a look as soon as possible! Thanks! |
@krizzdewizz @joaomoreno Source here -> https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/execution/electron-browser/terminalService.ts#L27 I've done some tests and I can get bash to work when supplying This is the test script code I used to get this working for bash. 'use strict';
const cp = require('child_process');
const child = cp.spawn('cmd.exe', ['/c', 'start', '/wait', 'bash'], { cwd: __dirname });
child.on('error', err => {
console.log("error", err);
});
child.on('exit', code => {
console.log("terminal closed");
}); I think we should also add the error handling code as it's not present |
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. |
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.
Thanks for this great tool!
The text was updated successfully, but these errors were encountered: