Skip to content

Instantly share code, notes, and snippets.

@TimDorand
Created February 3, 2021 09:57
Show Gist options
  • Save TimDorand/02b8dad46bb8d62f53eccca5e815faca to your computer and use it in GitHub Desktop.
Save TimDorand/02b8dad46bb8d62f53eccca5e815faca to your computer and use it in GitHub Desktop.
Simple zshrc with pwd and git branch on the right
# 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