summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Bravender <dan.bravender@gmail.com>2010-08-03 11:25:48 +0800
committerLeonid Volnitsky <leonid@volnitsky.com>2011-01-29 15:26:49 +0800
commit26399ed27e357b1bcd1bbd47182fcc474ebb52e9 (patch)
tree5b10f7f13b42b587dac8e03dccf9649099935c53
parentFile lists now work under Mac OS X (diff)
downloadgit-prompt-26399ed27e357b1bcd1bbd47182fcc474ebb52e9.tar.gz
git-prompt-26399ed27e357b1bcd1bbd47182fcc474ebb52e9.tar.bz2
git-prompt-26399ed27e357b1bcd1bbd47182fcc474ebb52e9.zip
My TERM is xterm-256color even under screen for some reason
-rwxr-xr-xgit-prompt.sh29
1 files changed, 16 insertions, 13 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index f951623..3b8cc4c 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -220,22 +220,25 @@ set_shell_label() {
# FIXME $STY not inherited though "su -"
[ "$STY" ] && screen -S $STY -X title "$*"
}
+ if [[ -n "$STY" ]]; then
+ screen_label "$*"
+ else
+ case $TERM in
- case $TERM in
+ screen*)
+ screen_label "$*"
+ ;;
- screen*)
- screen_label "$*"
- ;;
-
- xterm* | rxvt* | gnome-terminal | konsole | eterm | wterm )
- # is there a capability which we can to test
- # for "set term title-bar" and its escapes?
- xterm_label "$plain_who_where $@"
- ;;
+ xterm* | rxvt* | gnome-terminal | konsole | eterm | wterm )
+ # is there a capability which we can to test
+ # for "set term title-bar" and its escapes?
+ xterm_label "$plain_who_where $@"
+ ;;
- *)
- ;;
- esac
+ *)
+ ;;
+ esac
+ fi
}
export -f set_shell_label