Files
dotfiles/zsh/.zshrc.d/git.zsh
T
2026-06-27 21:25:33 -04:00

15 lines
504 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
# Bright green user@host (matches bash git.bash)
PROMPT='%B%F{46}%n@%m%b%f %F{51}%~%f%F{90}${vcs_info_msg_0_}%f $ '