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

update-core's msg()/warning()/error() print color messages that could be hard to read on light-bg terminal #27

Open
ElTopo opened this issue Mar 3, 2016 · 0 comments

Comments

@ElTopo
Copy link

ElTopo commented Mar 3, 2016

I am using a light background terminal, when running update-core some color messages are very hard to read.

msg()/warning()/error() print out color messages like this on my terminal:
https://www.flickr.com/gp/lxl221/d9W0cJ

I know I can use $nocolor environment variable to force the script to print colorless messages, but it would be nice to see colors.

The fix is simple, just set the color message's background to black (since the code was written for dark background terminals):

# colors
if [[ -t 1 && -z "${nocolor}" ]]; then
  color_red='\e[40;1;31m'
  color_yellow='\e[40;1;33m'
  color_blue='\e[40;1;34m'
  color_white='\e[40;1;37m'
  color_normal='\e[0m'
fi

The same messages with the fix:
https://www.flickr.com/gp/lxl221/a405GG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant