Skip to content
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

Terminal colors dont work & show weird characters (fish shell) #299

Closed
tennox opened this issue Oct 15, 2021 · 6 comments
Closed

Terminal colors dont work & show weird characters (fish shell) #299

tennox opened this issue Oct 15, 2021 · 6 comments
Labels
bug Something isn't working waiting Waiting for confirmation, more information, ...

Comments

@tennox
Copy link

tennox commented Oct 15, 2021

Have a fresh raspbian/debian with fish shell:
Screenshot from 2021-10-15 15-26-31

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Oct 17, 2021

What does echo $TERM output, and is this different from when you're connecting to your server outside VS Code?

Did you also add -CHECK_HOME to your flags? Using fish as login shell should error right now about not finding the home directory (fish doesn't support backticks for command substitution, which I use for this). I'm actually working on a way to support a lot more shells, which will help with this. This is separate from the weird characters/colors though.

EDIT: After another quick look, it seems to be that the underlying ssh2 library (or OpenSSH itself) uses vt100 as the default $TERM which leads to this weird behavior. As a quick fix, you could try running TERM=xterm $SHELL or even making that your Terminal command. This should make fish act as normal. In the meantime I'll look into what the best $TERM is based on what VS Code's terminal UI supports, and override the $TERM environment variable with that in the future.

@SchoofsKelvin SchoofsKelvin added bug Something isn't working waiting Waiting for confirmation, more information, ... labels Oct 17, 2021
@psolyca
Copy link

psolyca commented Oct 18, 2021

To get color and get ride of this vt100 terminal, I have used the new environment variable in my config.
I did not find it quickly as not documented but it is discussed in this issue #241 (and commit 3109e97).
Add "environment": {"TERM":"xterm"} or xterm-256color to your server configuration.

@tennox
Copy link
Author

tennox commented Oct 18, 2021

Yep, inside VSCodium it's vt100 and the suggestion of @psolyca fixed the issue 👍

Thanks also for the tip about "sshfs.flags": ["-CHECK_HOME"] 👍
it removes the warning I had to ignore each time 😋

@tennox tennox changed the title Terminal colors dont work & show weird characters Terminal colors dont work & show weird characters (fish shell) Oct 18, 2021
@SchoofsKelvin
Copy link
Owner

Seems like the integrated terminal has full xterm-256color support, so I'll be setting that as an environment variable, once I've dealt with the home directory detection for fish failing.

@SchoofsKelvin
Copy link
Owner

Fixed in 554eda8, which will be in the next release (v1.23.2 or later), sets $TERM to xterm-256color which should work for all shells. Tested by using fish as login shell and by running tmux with bash as login shell, along with simply echo $TERM.

@SchoofsKelvin
Copy link
Owner

Released in v1.24.0 of the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting Waiting for confirmation, more information, ...
Projects
None yet
Development

No branches or pull requests

3 participants