Last active
June 6, 2023 23:13
-
-
Save crshmk/14a13c75f2b847ec39a2a50959fec8da to your computer and use it in GitHub Desktop.
zsh prompt with directory and git branch
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 | |
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