Last active
December 9, 2020 20:03
-
-
Save willfolsom/43d26018be685c651968431124a79906 to your computer and use it in GitHub Desktop.
Add Git Branch Information to .zshrc (then save and run `source .zshrc`)
This file contains 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
# Load version control information | |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
# Format the vcs_info_msg_0_ variable | |
zstyle ':vcs_info:git:*' formats '%F{green}[%b]%f ' | |
# Set up the prompt (with git branch name) | |
setopt PROMPT_SUBST | |
PROMPT='%n ${PWD/#$HOME/~} ${vcs_info_msg_0_}$ ' |
Author
willfolsom
commented
Dec 9, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment