Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Awesome! Running $tput colors will tell you if you have 256 or not (mine shows 8). I am on ubuntu and found a tutorial to upgrade - will give it a try just so I can run this.

Slightly off-topic, I had some fun with tput about a month ago here: http://max.io/bash.html ...but it only supports 8 colors. Maybe I can upgrade with this new knowledge. Thank you!



I just did "export TERM=xterm-256color" in my gnome-terminal 3.8.4 which made "tput colors" return 256 and the script worked.


Awesome! Thanks for sharing, I'm going to have fun pimping my scripts now.


tput doesn't seem to recognize Konsole's 24bit color support though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: