Skip to content

Commit

Permalink
[screen] -Fix: don't display tty number if xterm is screen but or is …
Browse files Browse the repository at this point in the history
…empty (those responsible for the previous fix were fixed)
  • Loading branch information
Juhász Péter committed Oct 21, 2013
1 parent 02b4c1e commit 9b3149a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,13 @@ set_shell_label() {
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")
else
tty=
fi

# if we start an ssh connection from within a screen/tmux session,
# the "screen" $TERM setting tends to be preserved.
# In this case we don't want a tty (it would be a misleading "0"),
# In this case we don't want the tty displayed (it would be a misleading "0"),
# unless there is an actual screen/tmux session on the server too.
if [[ -n "$tty" ]]; then
# replace tty number with circled numbers
Expand Down

0 comments on commit 9b3149a

Please sign in to comment.