Created
February 3, 2021 09:57
-
-
Save TimDorand/02b8dad46bb8d62f53eccca5e815faca to your computer and use it in GitHub Desktop.
Simple zshrc with pwd and git branch on the right
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
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
#[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh | |
# Load version control information | |
autoload -Uz vcs_info | |
precmd() { vcs_info } | |
# Format the vcs_info_msg_0_ variable | |
zstyle ':vcs_info:git:*' formats '%b' | |
# Set up the prompt (with git branch name) | |
setopt PROMPT_SUBST | |
#PROMPT='%n in ${PWD/#$HOME/~} >' | |
PROMPT='${PWD/#$HOME/~} >' | |
RPROMPT=\$vcs_info_msg_0_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment