Skip to content

Instantly share code, notes, and snippets.

@j3ck
Created April 18, 2015 21:05
Show Gist options
  • Select an option

  • Save j3ck/137aef783cf17ef00848 to your computer and use it in GitHub Desktop.

Select an option

Save j3ck/137aef783cf17ef00848 to your computer and use it in GitHub Desktop.
zsh config
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg_bold[$NCOLOR]%}%n@%m\
%{$reset_color%}:%{$fg_bold[magenta]%}%~\
$(git_prompt_info)\
%{$fg_bold[red]%}$%{$reset_color%} '
PROMPT2='%{$fg_bold[red]%}\ %{$reset_color%}'
RPS1='${return_code}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}("
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%} ✔%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} ✘%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[yellow]%})%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment