Ari Pollak/ Zsh Tips
# Function Usage: doc packagename
#                 doc pac
doc()  { cd /usr/share/doc/$1 && ls }
_doc() { _files -W /usr/share/doc -/ }
compdef _doc doc
case $TERM in
    xterm*)
        ## Run when the PWD is changed. Put the PWD in the title of the xterm.
        function precmd {
            print -Pn "\033]2; %n@%m - %~\007"
        }
        ;;
esac