Skip to content

Instantly share code, notes, and snippets.

@shaltaev
Created February 4, 2021 11:45
Show Gist options
  • Save shaltaev/99a937fde79c5a3010ee3550db1b0fe0 to your computer and use it in GitHub Desktop.
Save shaltaev/99a937fde79c5a3010ee3550db1b0fe0 to your computer and use it in GitHub Desktop.
Simple ".zshrc"
setopt prompt_subst
autoload -Uz vcs_info
PR_RST="%f"
FMT_BRANCH="(%{%F{cyan}%}%b %u%c${PR_RST}) "
FMT_ACTION="(%{%F{green}%}%a${PR_RST})"
FMT_UNSTAGED="%{%F{red}%}●"
FMT_STAGED="%{%F{green}%}●"
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*:*' check-for-changes true
zstyle ':vcs_info:*:*' unstagedstr "${FMT_UNSTAGED}"
zstyle ':vcs_info:*:*' stagedstr "${FMT_STAGED}"
zstyle ':vcs_info:*:*' actionformats "${FMT_BRANCH}${FMT_ACTION}"
zstyle ':vcs_info:*:*' formats "${FMT_BRANCH}"
precmd() { vcs_info }
PROMPT=''$'\n''${vcs_info_msg_0_}%n in ${PWD/#$HOME/~} '$'\n''> '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment