Skip to content

Instantly share code, notes, and snippets.

@nivaca
Created May 12, 2021 19:27
Show Gist options
  • Save nivaca/9453e41b03fdaee564e8f8c8240477a0 to your computer and use it in GitHub Desktop.
Save nivaca/9453e41b03fdaee564e8f8c8240477a0 to your computer and use it in GitHub Desktop.
function _prompt_char() {
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
echo ' '
fi
}
PROMPT='%F{red}[%B%F{220}%n%F{green}@%F{39}%m %F{5}%1~%F{red}$(_prompt_char)$(git_prompt_info)%F{red}%b]%f
%# '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment