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

Is there support for 256 colors on the integrated terminal for Windows? #24620

Closed
rfgamaral opened this issue Apr 12, 2017 · 9 comments
Closed
Assignees
Labels
terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@rfgamaral
Copy link

I have configured ZSH as integrated terminal on my VS Code instance on Windows. Like this:

"terminal.integrated.shell.windows": "C:\\Cygwin\\bin\\zsh.exe",
"terminal.integrated.shellArgs.windows": [
    "-lic",
    "cd $OLDPWD; exec zsh"
]

This is working, but colors are not that great. It seems that only 8 are supported.

Here's ZSH running on Mintty (it also comes from Cygwin, no extra setup):

mintty

And here's VS Code integrated terminal configured as mentioned above:

vscode

I have run set TERM=xterm on VS Conde before running the spectrum_ls command (which prints all the colors). I've also tried set TERM=xterm-256colors but it didn't work either.

Am I missing something?

@Tyriar
Copy link
Member

Tyriar commented Apr 17, 2017

Hmm, works fine on Linux:

image

Can you try running this so I know what is being run?

for fgbg in 38 48 ; do #Foreground/Background
  for color in {0..256} ; do #Colors
    #Display the color
    echo -en "\e[${fgbg};5;${color}m ${color}\t\e[0m"
    #Display 10 colors per lines
    if [ $((($color + 1) % 10)) == 0 ] ; then
      echo #New line
    fi
  done
  echo #New line
done

@rfgamaral
Copy link
Author

Here you go:

image

@Tyriar
Copy link
Member

Tyriar commented Apr 20, 2017

Thanks I can repro, it's likely an upstream issue on Windows.

@Tyriar Tyriar added terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Apr 20, 2017
@rfgamaral
Copy link
Author

Meaning a fix will probably take a while?

@Tyriar
Copy link
Member

Tyriar commented Apr 21, 2017

Created an upstream issue, we'll see what the response is rprichard/winpty#108

@rfgamaral
Copy link
Author

@Tyriar I'm not sure if this issue is related but... I've updated my integrated terminal to this configuration (slight change):

"terminal.integrated.shell.windows": "C:\\Cygwin64\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
    "/bin/xhere",
    "/bin/zsh"
]

And I'm using the Oh My Zsh agnoster theme. Thing is, the integrated terminal doesn't even render a black background properly:

image

The first prompt segment (the one my username@host) should have a black background as you can see from the next segment transition (the > symbol). For some reason, in that first prompt segment, the black background is actual "transparent".

Is this related or a different issue? Or not at all a VS code issue?

@Tyriar
Copy link
Member

Tyriar commented Apr 26, 2017

@rfgamaral this is an upstream problem, we just render what's given back from winpty rprichard/winpty#108

@adalinesimonian
Copy link

Based on the discussion in rprichard/winpty#108, does it make sense for VSCode to use wslbridge directly, or is it better to work on implementing support in winpty for "Cygwin/MSYS2/WSL" as mentioned in rprichard/winpty#108 (comment)?

@Tyriar
Copy link
Member

Tyriar commented Dec 22, 2017

Closing in favor of the upstream issue, our team doesn't plan on investing in this area.

@Tyriar Tyriar closed this as completed Dec 22, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
terminal Integrated terminal issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants