Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a7152ac63b
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (34 sloc) 1.112 kb
autoload -U add-zsh-hook
if echo $TERM | egrep -i "^(xterm|eterm|aterm|rxvt|screen)$" > /dev/null 2>&1
then
STATUSBAR=1
fi
function statusbar_preexec {
if [[ "$STATUSBAR" == "1" ]]
then
echo -ne "\e]1;\a\e]2;`whoami`@`hostname` - $1\a"
fi
echo -ne "\033[0m"
}
add-zsh-hook preexec statusbar_preexec
stacked_dirs=()
bell=`tput bel`
function statusbar_precmd {
setup_prompt
stacked_dirs=("`pwd`" $dirstack);
saved_dirstack=($dirstack)
stacked_dirs_current=1
if [[ "$STATUSBAR" == "1" ]]
then
echo -ne "\e]1;\a\e]2;`whoami`@`hostname` - zsh (`pwd`)\a"
# Set tab (not window) title on iTerm.
# We only set the last part of the directory and the server due to limited space
if [[ "$LC_TERM_PROGRAM" == "iTerm.app" ]] then
# http://stackoverflow.com/a/1371283/315168
tab_title="${PWD##*/} @ `hostname`"
echo -ne "\033]0;"$tab_title"\007"
fi
fi
echo -ne "\017"
}
add-zsh-hook precmd statusbar_precmd
Jump to Line
Something went wrong with that request. Please try again.