Created
April 11, 2014 16:59
-
-
Save jocafa/10484310 to your computer and use it in GitHub Desktop.
.zshrc git info and prompt stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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