Skip to content

Commit

Permalink
[screen] -Fix: display host name in screen/tmux window title if remot…
Browse files Browse the repository at this point in the history
…e shell
  • Loading branch information
Juhász Péter committed Oct 21, 2013
1 parent 9b3149a commit 4153458
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ set_shell_label() {
# FIXME: run this only if screen is in xterm (how to test for this?)
xterm_label "$full"

# display host name in window title if remote shell
if [[ -n ${SSH_CLIENT} || -n ${SSH2_CLIENT} ]]; then
param="@$host:$param"
fi

printf "\033k%s\033\\" "$param"
}

Expand Down

0 comments on commit 4153458

Please sign in to comment.