Skip to content

Commit

Permalink
-Add: display tmux session name in xterm title
Browse files Browse the repository at this point in the history
  • Loading branch information
Juhász Péter committed Oct 20, 2013
1 parent c1bb420 commit 19deaa6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ set_shell_label() {
full=${full//$ellipse_marker/$ellipse_marker_plain}
fi

if [[ "$TMUX" ]]; then
full="$plain_who_where|${_gp_tmux_session} $@"
fi

# FIXME: run this only if screen is in xterm (how to test for this?)
xterm_label "$full"

Expand Down Expand Up @@ -395,6 +399,8 @@ set_shell_label() {
tty="$WINDOW"
elif [[ "$TMUX" ]]; then
tty=$(tmux display-message -p "#I")
# also save tmux session name so that we can include it in the window title
_gp_tmux_session=$(tmux display-message -p "#S")
fi

# replace tty number with circled numbers
Expand Down

0 comments on commit 19deaa6

Please sign in to comment.