Skip to content

Instantly share code, notes, and snippets.

@piotrgredowski
Last active July 20, 2018 05:35
Show Gist options
  • Save piotrgredowski/f682615430e2b461919b05ea9b34c1d2 to your computer and use it in GitHub Desktop.
Save piotrgredowski/f682615430e2b461919b05ea9b34c1d2 to your computer and use it in GitHub Desktop.
# Adds to candy feature from bira - different chars & colors for root (red) and normal user (green).
if [[ $UID -eq 0 ]]; then
PROMPT=$'%{$fg_bold[red]%}%n@%m %{$fg[blue]%}%D{[%X]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
else
PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%X]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\
%{$fg[blue]%}->%{$fg_bold[blue]%} %%%{$reset_color%} '
fi
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment