Skip to content

Instantly share code, notes, and snippets.

@geakstr
Last active January 4, 2016 14:09
Show Gist options
  • Save geakstr/8632148 to your computer and use it in GitHub Desktop.
Save geakstr/8632148 to your computer and use it in GitHub Desktop.
Theme for ZSH
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local ret_status="%(?:%{$fg_bold[green]%}%(!.#.>) :%{$fg_bold[red]%}%(!.#.>) %s)"
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
%{$reset_color%} %{$fg[magenta]%}%~\
$(git_prompt_info) \
${ret_status}%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%} ("
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} •%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ¡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment