Skip to content

Commit

Permalink
-Fix: remove dead code from section that sets screen window number, a…
Browse files Browse the repository at this point in the history
…dd tmux support
  • Loading branch information
Juhász Péter committed Oct 19, 2013
1 parent a19d810 commit 361d52c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,20 +388,20 @@ set_shell_label() {
tty=`echo $tty | sed "s:/dev/pts/:p:; s:/dev/tty::" ` # RH tty devs
tty=`echo $tty | sed "s:/dev/vc/:vc:" ` # gentoo tty devs

# replace tty name with screen number
# however, "screen" as $TERM may also mean tmux
if [[ "$TERM" =~ "screen" ]] ; then

# [ "$WINDOW" = "" ] && WINDOW="?"
#
# # if under screen then make tty name look like s1-p2
# # tty="${WINDOW:+s}$WINDOW${WINDOW:+-}$tty"
# tty="${WINDOW:+s}$WINDOW" # replace tty name with screen number
tty="$WINDOW" # replace tty name with screen number
if [[ "$STY" ]]; then
tty="$WINDOW"
elif [[ "$TMUX" ]]; then
tty=$(tmux display-message -p "#I")
fi
fi

# we don't need tty name under X11
case $TERM in
xterm* | rxvt* | gnome-terminal | konsole | eterm* | wterm | cygwin) unset tty ;;
*);;
xterm* | rxvt* | gnome-terminal | konsole | eterm* | wterm | cygwin) unset tty ;;
*);;
esac

dir_color=${!dir_color}
Expand Down

0 comments on commit 361d52c

Please sign in to comment.