2021-03-13 12:51:26 +00:00
|
|
|
autoload -Uz colors && colors
|
|
|
|
|
|
|
|
autoload -Uz vcs_info
|
|
|
|
zstyle ':vcs_info:*' check-for-changes true
|
|
|
|
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
|
|
|
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
|
|
|
zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f '
|
|
|
|
zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f '
|
|
|
|
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
|
|
|
zstyle ':vcs_info:*' enable git cvs svn
|
|
|
|
zstyle ':vcs_info:git*+set-message:*' hooks untracked-git
|
|
|
|
|
|
|
|
+vi-untracked-git() {
|
|
|
|
if command git status --porcelain 2>/dev/null | command grep -q '??'; then
|
|
|
|
hook_com[misc]='%F{red}?'
|
|
|
|
else
|
|
|
|
hook_com[misc]=''
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
gentoo_precmd() {
|
|
|
|
vcs_info
|
2011-06-05 23:57:21 +00:00
|
|
|
}
|
|
|
|
|
2021-03-13 12:51:26 +00:00
|
|
|
autoload -U add-zsh-hook
|
|
|
|
add-zsh-hook precmd gentoo_precmd
|
2010-12-02 00:49:13 +00:00
|
|
|
|
2021-05-28 09:14:58 +00:00
|
|
|
PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%F{blue}%(!.#.$)%k%b%f '
|