Hyper: Terminal colours not working correctly with bash on Windows

Created on 27 Mar 2017  路  12Comments  路  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

Issue

After running a command that outputs colours to the terminal, the text in the terminal is inverted.
This doesn't happen in any other terminals I've tried.
Hyper:
Hyper
cmd.exe:
cmd
powershell:
powershell
mintty:
mintty

馃憜 Is Upstream Windows Compatibility

Most helpful comment

I had to reset my CMD colors before the colours in bash on Windows behaved normally. After that I could use a theme for Hyper. (I had used a theme for CMD before.)
https://www.sevenforums.com/tutorials/401170-command-prompt-restore-default-personalization-settings.html

All 12 comments

I had to reset my CMD colors before the colours in bash on Windows behaved normally. After that I could use a theme for Hyper. (I had used a theme for CMD before.)
https://www.sevenforums.com/tutorials/401170-command-prompt-restore-default-personalization-settings.html

I'm noticing what I believe is the same issue in Bash on Ubuntu on Windows, using vanilla Hyper.app (default index.js). Here's a screenshot of a directory view:

image

The directory labels (example: node_modules) are using blue as foreground and green as background. The same blue is used for the path's background color and the green is used as the text color for the files. In the vanilla theme, this isn't unreadable enough for me to notice as unusual at first, but with different themes you can see how significant of an issue it is:

hyperterm-atom-dark
image

hyper-solarized-dark
image

In the case of the latter theme, you can see in this related issue what the directory colors are supposed to look like. The background orange is apparently what the git branch status uses.

@chilblane The directory colours there are a different issue, it is to do with Bash on Ubuntu on Windows setting permissions incorrectly by default.

That can be solved be fixing the umask. See Microsoft/BashOnWindows#352
Of course, you'll have to fix the permissions for each directory already affected, but new ones should be fixed.

Hey there, please try again with the new Hyper v2 release and open a new issue if the problem stills exists. Thank you!

I'm afraid that this issue remains in the 2.0 version.
OS version: Windows 10 Pro Build 17134.1
Hyper config location

Expected rendering:
capture

Hyper rendering:
capture - 2

There are three problems here:

  1. When Bright White is set as background, it becomes black.
  2. When background and foreground is set to same color, it becomes white instead of that very color.
  3. When Bright White is set as background and Dark Black is set as foreground, the result is reversed.

Thanks for reporting back!

Hey there, to verify if this is indeed a Hyper issue or upstream at https://github.com/xtermjs/xterm.js/ could you please test if another xterm.js powered terminal shows the same problem you are experiencing? I suggest using https://github.com/Microsoft/vscode for testing. Thanks!

Yes, latest vscode(1.23.0) has the same problem.

capture

Thanks for checking! Marking as upstream issue.

It is still happening. @Stanzilla did you mark the issue on xterm.js? I couldn't find it, but it would be nice to know the status of this... Could you reference it here?

Interesting fact: it works like a charm not only on PowerShell but also on plain old cmd.exe. This is indeed a xterm.js only bug 馃槩

No, I never filed an issue for that :(

this worked for me and it wasn't too complicated, so thought I'd share :) scroll down to the section about dircolors:

https://medium.com/@Andreas_cmj/how-to-setup-a-nice-looking-terminal-with-wsl-in-windows-10-creators-update-2b468ed7c326

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eoinmurray picture eoinmurray  路  3Comments

legomushroom picture legomushroom  路  3Comments

laur1s picture laur1s  路  3Comments

aem picture aem  路  3Comments

cooperpellaton picture cooperpellaton  路  3Comments