This commit is contained in:
gotyaoi 2015-02-25 13:25:16 +00:00
commit abffb87839

View file

@ -13,9 +13,9 @@ function title {
# if it is set and empty, leave it as is
: ${2=$1}
if [[ "$TERM" == screen* ]]; then
if [[ "$TERM" == screen* ]] && [[ -z $TMUX ]]; then
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
elif [[ "$TERM" == xterm* ]] || [[ "$TERM" == rxvt* ]] || [[ "$TERM" == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
elif [[ "$TERM" == xterm* ]] || [[ "$TERM" == rxvt* ]] || [[ "$TERM" == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]] || [[ -n $TMUX ]]; then
print -Pn "\e]2;$2:q\a" #set window name
print -Pn "\e]1;$1:q\a" #set icon (=tab) name
fi