14 lines
468 B
Bash
14 lines
468 B
Bash
# Git + colorful prompt
|
|
autoload -Uz vcs_info
|
|
precmd_vcs_info() { vcs_info }
|
|
precmd_functions+=(precmd_vcs_info)
|
|
|
|
zstyle ':vcs_info:*' enable git
|
|
zstyle ':vcs_info:*' check-for-changes true
|
|
zstyle ':vcs_info:git:*' formats ' (%b%u%c)'
|
|
zstyle ':vcs_info:git:*' actionformats ' (%b%u%c)'
|
|
zstyle ':vcs_info:git:*' stagedstr ' +'
|
|
zstyle ':vcs_info:git:*' unstagedstr ' *'
|
|
|
|
setopt prompt_subst
|
|
PROMPT='%B%F{38;5;46m}%n@%m%b%f %F{38;5;51m}%~%f%F{90m}${vcs_info_msg_0_}%f $ ' |