setopt prompt_subst autoload -Uz vcs_info # display the name of the branch zstyle ':vcs_info:git*' formats " [%b]" zstyle ':vcs_info:*' enable git precmd () { vcs_info } PROMPT='%m%f:%F{green}%~%f%F{yellow}$vcs_info_msg_0_ %F{reset}' # For tramp (emacs). if [ "$TERM" = "dumb" ]; then unset PROMPT PS1='$ ' unsetopt zle fi