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

True Color not working on Bash on Windows #1733

Closed
2 tasks done
PowerSnail opened this issue Apr 7, 2017 · 15 comments
Closed
2 tasks done

True Color not working on Bash on Windows #1733

PowerSnail opened this issue Apr 7, 2017 · 15 comments
Labels
🖼 Platform: Windows Issue pertains to Windows

Comments

@PowerSnail
Copy link

  • I am on the latest Hyper.app version

  • I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: Windows 10

  • Hyper.app version: 1.3.1

  • Link of a Gist with the contents of your .hyper.js: Default

  • Relevant information from devtools (CMD+ALT+I on Mac OS, CTRL+SHIFT+I elsewhere): None

  • The issue is reproducible in vanilla Hyper.app: Yes

Issue

Bash on Windows supports 24bit true colour with Truecolour escape codes. Running test script that I found here, the following are results from

  1. Bash on Windows

1

  1. Hyper. (CMD starts by default, type bash, and run the script)

capture

@eoinmurphy
Copy link

eoinmurphy commented Apr 16, 2017

This might be a noob question, but do you have a bash terminal simply because you're running Windows 10? I've always used the Git Bash terminal on Windows 7, so having Hyper limited to the default terminal is a little saddening.

@chabou
Copy link
Contributor

chabou commented Apr 18, 2017

@eoinmurphy You can configure the shell you want. Just set shell parameter in config file.

@PowerSnail Having 24-bit color could be hard to achieve. Some other term app have some tricks: http://conemu.github.io/en/BashOnWindows.html#wslbridge We need to test hterm compatibility with 24bit colors.

@MartyGentillon
Copy link
Contributor

It does look like xterm.js is working on this (for whenever that transfer is done...) xtermjs/xterm.js#484

@MartyGentillon
Copy link
Contributor

also, related: #364

@itsjoel
Copy link

itsjoel commented Dec 28, 2017

I know I'm necroing this a bit but is there any fix yet? I really want to use fish with the bobthefish theme and it is unusably bad in hyper when using Windows Subsystem for Linux.
image

@trusktr
Copy link

trusktr commented Feb 11, 2018

Bump.

The screenshot shows that although I've selected multiple lines of text in NeoVim, it looks as if nothing is selected (not just ugly, but negative impact on perceived functionality):

bad_color

@blark
Copy link

blark commented Feb 12, 2018

Would really like to see true color support. Been using this on WSL since it came out, and on my other platforms (Linux and Mac) so all my configs are set for it. I'd really like to switch to Hyper but true color is too nice to give up :)

@c0desurfer
Copy link

c0desurfer commented Feb 25, 2018

And powerline is failing as well and probably because of this (on Windows (!)) :/ See #2470.

@bokub
Copy link

bokub commented Apr 7, 2018

Color support is even worse on my computer: unsupported colors are just hidden.
I use windows 10 too and Hyper 1.4.8

screenshot

@mhamrah
Copy link

mhamrah commented Apr 8, 2018

Ditto- this is a problem in hyper and vs code's integrated terminal. Here's a simple color output function and a screenshot.

 colors() {
	for COLOR in {0..255}
	do
	    for STYLE in "38;5"
	    do
		TAG="\033[${STYLE};${COLOR}m"
		STR="${STYLE};${COLOR}"
		echo -ne "${TAG}${STR}${NONE}  "
	    done
	    echo
	done
}

image

@JSn1nj4
Copy link

JSn1nj4 commented Apr 18, 2018

Having the same issue, though I notice that both Hyper and ConEmu, when using Git Bash, have to run it via C:\\Program Files\\Git\\git-cmd.exe --command=usr/bin/bash.exe -l -i.

When I run the same color test script linked by the OP, the true color support works in C:\Program Files\Git\git-bash.exe. But when I run it in a bash session started inside of git-cmd.exe instead, the color output is broken. Same if I start CMD, run C:\Program Files\Git\bin\bash.exe, and then run the test script again.

This makes me wonder if it's more a CMD issue than an issue with Hyper itself...

@blark is this an issue for you when using Hyper on Linux or Mac?

@Jaykul
Copy link

Jaykul commented Apr 19, 2018

Well, yes -- of course it's an issue with Windows' conhost. But to be clear, that's the underlying console subsytem that all console apps run in. In other words, it's the core difficulty of implementing something like hyper on Windows, and it's not just a problem with a few particular apps or ways of running them.

Bottom line: although the console subsystem has seen major improvements in the Windows 10 era (to support ANSI escape sequences, among other things), it's still not based on input/output pipelines the way PTY works on posix subsystems.

That's why things like mintty (and wslbridge, which just wraps mintty) make a difference -- when you run apps through them, if the app supports it, then it behaves as though it were running "remotely" (e.g. over SSH) via a pipe (the Linux way, if you will).

However, that's not the native way to write or run console apps in Windows, and most interactive Windows console apps --like Python, when used as a REPL-- don't work when run in mintty or other similar emulators.

@albinekb albinekb added the 🖼 Platform: Windows Issue pertains to Windows label Apr 20, 2018
@meijieru
Copy link

meijieru commented Oct 2, 2018

So any workground?

@eromoe
Copy link

eromoe commented Mar 14, 2019

Finally know why vim colorscheme and theme looked werid
image

Almost two years gone ...

version: hyper 3.0.0-canary.8

@Stanzilla
Copy link
Contributor

should work in CI builds of canary and the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖼 Platform: Windows Issue pertains to Windows
Projects
None yet
Development

No branches or pull requests