diff options
author | Dan Bravender <dan.bravender@gmail.com> | 2010-08-03 11:25:48 +0800 |
---|---|---|
committer | Leonid Volnitsky <leonid@volnitsky.com> | 2011-01-29 15:26:49 +0800 |
commit | 26399ed27e357b1bcd1bbd47182fcc474ebb52e9 (patch) | |
tree | 5b10f7f13b42b587dac8e03dccf9649099935c53 | |
parent | File lists now work under Mac OS X (diff) | |
download | git-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-x | git-prompt.sh | 29 |
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 |