## Prompt ## vim:ft=zsh # RPS1 is on the right side of the terminal # The \ek\e\\ is for screen's 'shelltitle' # psvar[1] = directory info # psvar[2] = rtab (current directory) typeset -A ps rps ps=( host "%F{yellow}%m" dir "%F{default}%30<…<%2v%>>" sign "%(!.%F{red}.%F{green})%(?.%(!.#.>).%?)%F{reset}" screen $'%{\ek\e\\%}' ) rps=( start_always "%F{yellow}[" start_screen "%(1V.%F{yellow}[" dirinfo "%F{cyan}%1v%F{default}" time '%T' end_always "%F{yellow}]%F{default}" end_screen "%(1V.%F{yellow}]%F{default}.)" ) PS1="${ps[host]} ${ps[dir]} ${ps[sign]} ${ps[screen]}" if [[ $TERM == screen ]] { RPS1="${rps[start_screen]}${rps[dirinfo]}${rps[end_screen]}" } else { RPS1="${rps[start_always]}${rps[dirinfo]}${rps[time]}${rps[end_always]}" } unset ps rps zstyle ':prompt:rtab' fish yes zstyle ':prompt:rtab' nameddirs yes