Skip to content

Instantly share code, notes, and snippets.

@crshmk
Last active June 6, 2023 23:13
Show Gist options
  • Save crshmk/14a13c75f2b847ec39a2a50959fec8da to your computer and use it in GitHub Desktop.
Save crshmk/14a13c75f2b847ec39a2a50959fec8da to your computer and use it in GitHub Desktop.
zsh prompt with directory and git branch
autoload -Uz vcs_info
precmd() { vcs_info }
zstyle ':vcs_info:git:*' formats '- %b'
zstyle ':vcs_info:*' check-for-changes true
setopt PROMPT_SUBST
PROMPT='${PWD/#$HOME/~} %F{white}%B${vcs_info_msg_0_}%b%f
%# '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment