Permalink
Browse files

simpler color prompt decision

  • Loading branch information...
1 parent 932e304 commit fab3fc1f2975f8c4d78108165f90fef8783c800b @russell committed Apr 11, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 bashrc
View
8 bashrc
@@ -40,14 +40,10 @@ if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
-# set a fancy prompt (non-color, unless we know we "want" color)
-# http://stackoverflow.com/questions/2465425/how-do-i-determine-if-a-terminal-is-color-capable
-if [ -x /usr/bin/tput ] && [ `tput colors 2> /dev/null` -gt 2 ]; then
- color_prompt=yes;
-fi
-
case "$TERM" in
+ dumb) ;;
xterm-color) color_prompt=yes;;
+ xterm) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned

0 comments on commit fab3fc1

Please sign in to comment.