summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-03-12 11:04:54 +0100
committerErich Eckner <git@eckner.net>2017-03-12 11:04:54 +0100
commit70d8febe5a90a451998640a65f6901dad884fe96 (patch)
tree3e6dea7bc3bf3d7dd2ecfde3e7a71f92b35399e9
parent17f67422c45c687c1cb84212e1e529e4be9b6df1 (diff)
downloadbash-git-prompt-70d8febe5a90a451998640a65f6901dad884fe96.tar.xz
use "tput colors" to detect if colors are available
-rwxr-xr-xbash-git-prompt.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash-git-prompt.in b/bash-git-prompt.in
index d2bbdb3..b57bef2 100755
--- a/bash-git-prompt.in
+++ b/bash-git-prompt.in
@@ -2,7 +2,7 @@
# bash-git-prompt version #VERSION#
-[[ "$TERM" = *color ]] && mitFarbe=true || mitFarbe=false
+tput colors &> /dev/null && mitFarbe=true || mitFarbe=false
if [ -z "$PS1Start" ] && [ -z "$PS1Ende" ] && [ -n "$PS1" ]
then