diff options
Diffstat (limited to 'git-prompt.sh')
-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 |