Skip to content

Instantly share code, notes, and snippets.

@jocafa
Created April 11, 2014 16:59
Show Gist options
  • Save jocafa/10484310 to your computer and use it in GitHub Desktop.
Save jocafa/10484310 to your computer and use it in GitHub Desktop.
.zshrc git info and prompt stuff
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' unstagedstr '%F{160}●'
zstyle ':vcs_info:git*' stagedstr '%F{40}●'
zstyle ':vcs_info:git*' formats '%F{220}± %F{255} %F{249}%b %u%c'
zstyle ':vcs_info:git*' actionformats '%F{220}± %F{45}%b|%a %u%c'
zstyle ':vcs_info:git*' check-for-changes true
precmd() {
vcs_info
}
# Fancy prompts ---------------------------------------------------------------
local return_code="%(?..%F{88}%F{255}%K{88} %? %{$reset_color%})"
PROMPT='%F{255}%K{33} %n@%m %F{33}%K{240} %F{255}%1~ %F{240}%K{236} ${vcs_info_msg_0_} %F{236}%k%{$reset_color%} '
RPROMPT='${return_code}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment