randy3k / Terminus

Bring a real terminal to Sublime Text
https://packagecontrol.io/packages/Terminus
MIT License
1.37k stars 83 forks source link

Make `shell_cmd` configurable #327

Open Zapeth opened 2 years ago

Zapeth commented 2 years ago

Looking at the source it seems that shell_cmd is hardcoded to execute commands using cmd/bash shell, it would be nice if this could be made configurable, like cmd in the shell_configs entries.

randy3k commented 2 years ago

Then why not to use cmd directly?

Zapeth commented 2 years ago

Sorry, I jumped to conclusions, I guess my issue might be a different one, let me elaborate:

I'm using Terminus in context of LSP-rust-analyzer plugin's Run functionality which apparently already uses cmd.

However, even though I have configured a custom shell config in Terminus config (set as default), it still seems to open cmd shell when executing Run (as evidenced by the fact that ansi escape sequences are not displayed correctly).

When I manually open a terminal instance, the configured custom shell is used as expected.

randy3k commented 2 years ago

The default config is not used actually if cmd is passed (I just notice that the name of the default config is however wrongly displayed at the title bar). I think it is an issue of the LSP-rust-analyzer. Double check if you are using the Terminus panel. ANSI escape sequences should always work no matter what shell_cmd or cmd are.

Zapeth commented 2 years ago

The default config is not used actually if cmd is passed (I just notice that the name of the default config is however wrongly displayed at the title bar). I think it is an issue of the LSP-rust-analyzer.

I think I see what you mean, but how is LSP-rust-analyzer supposed to solve this? Or actually it might work if it used shell_cmd, but that would lead back to my original question.

Double check if you are using the Terminus panel. ANSI escape sequences should always work no matter what shell_cmd or cmd are.

Unfortunately cmd.exe is an exception here. It might work with recent Windows 10 versions (if configured?), but older versions definitely dont (not sure about powershell) -> https://stackoverflow.com/questions/16755142/how-to-make-win32-console-recognize-ansi-vt100-escape-sequences