Skip to content

Instantly share code, notes, and snippets.

@brayhoward
Created March 16, 2021 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brayhoward/abce53456d1ae069fea1e69606e80e38 to your computer and use it in GitHub Desktop.
Save brayhoward/abce53456d1ae069fea1e69606e80e38 to your computer and use it in GitHub Desktop.
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
# color vars
eval gray='$FG[237]'
eval orange='$FG[214]'
eval yellow='$fg[yellow]'
eval red='$fg[red]'
eval cyan='$fg[cyan]'
eval magenta='$fg[magenta]'
# primary prompt
PROMPT='$FG[237]${(l.COLUMNS..-.)}%{$reset_color%}
$cyan%~\
$(git_prompt_info)$(hg_prompt_info) \
$FG[105]%(!.#.$)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${return_code}'
# right prompt
if type "virtualenv_prompt_info" > /dev/null
then
RPROMPT="${RPROMPT}"'$FG[078]$(virtualenv_prompt_info)%{$reset_color%} $gray%n@%m%{$reset_color%}%'
else
RPROMPT="${RPROMPT}"'$gray%n@%m%{$reset_color%}%'
fi
# git settings
ZSH_THEME_GIT_PROMPT_PREFIX="$magenta($FG[078]"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="$red*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$magenta)%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment