Removed commented-out debug prints

This commit is contained in:
Demetri Obenour 2014-01-13 21:44:21 -05:00
commit a47bfac033

View file

@ -9,8 +9,6 @@ function title {
if [[ "$TERM" == screen* ]]; then if [[ "$TERM" == screen* ]]; then
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars 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" ]]; then
# print -r "$2:q" 1>&2
# print -r "$1:q" 1>&2
print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]2;$2:q\a" #set window name
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
fi fi
@ -39,20 +37,20 @@ function omz_termsupport_preexec {
fi fi
if [[ -o PROMPT_SUBST ]]; then if [[ -o PROMPT_SUBST ]]; then
# We must escape $ and `, as both initiate command substitution and # We must escape $ and `, as both initiate command substitution and
# the former also initiates arithmetic and parameter expansion # the former also initiates arithmetic and parameter expansion
CMD=${CMD:gs/$/\\$} CMD=${CMD:gs/$/\\$}
CMD=${CMD:gs/\`/\\\`} CMD=${CMD:gs/\`/\\\`}
LINE=${LINE:gs/$/\\$} LINE=${LINE:gs/$/\\$}
LINE=${LINE:gs/\`/\\\`} LINE=${LINE:gs/\`/\\\`}
fi fi
if [[ -o PROMPT_PERCENT ]]; then if [[ -o PROMPT_PERCENT ]]; then
# We must escape % so that it is not interpreted as starting an escape sequence # We must escape % so that it is not interpreted as starting an escape sequence
CMD=${CMD:gs/%/%%} CMD=${CMD:gs/%/%%}
LINE=${LINE:gs/%/%%} LINE=${LINE:gs/%/%%}
fi fi
title "$CMD" "%100>...>$LINE%<<" title "$CMD" "%100>...>$LINE%<<"
} }
autoload -U add-zsh-hook autoload -U add-zsh-hook