added condition check to prevent sourcing the prompt if no $TERM as tput needs it

This commit is contained in:
Aurelien Requiem 2012-07-25 10:13:47 +10:00
parent 178ac74822
commit 17f3bd32ba

View File

@ -35,7 +35,7 @@
# green = no changes or commits # green = no changes or commits
# Check for recent enough version of bash. # Check for recent enough version of bash.
[ -z "$BASH_VERSION" -o -z "$PS1" ] && return; [ -z "$BASH_VERSION" -o -z "$PS1" -o -z "$TERM" ] && return;
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -lt 3 ] || [ $bmajor -eq 3 -a $bminor -lt 2 ]; then if [ $bmajor -lt 3 ] || [ $bmajor -eq 3 -a $bminor -lt 2 ]; then