af-magic.zsh-theme 1006 B

123456789101112131415161718192021222324252627282930313233343536
  1. # af-magic.zsh-theme
  2. #
  3. # Author: Andy Fleming
  4. # URL: http://andyfleming.com/
  5. # Repo: https://github.com/andyfleming/oh-my-zsh
  6. # Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
  7. #
  8. # Created on: June 19, 2012
  9. # Last modified on: June 20, 2012
  10. if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
  11. local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
  12. # primary prompt
  13. PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%}
  14. $FG[032]%~\
  15. $(git_prompt_info) \
  16. $FG[105]%(!.#.»)%{$reset_color%} '
  17. PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
  18. RPS1='${return_code}'
  19. # color vars
  20. eval my_gray='$FG[237]'
  21. eval my_orange='$FG[214]'
  22. # right prompt
  23. PROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%'
  24. # git settings
  25. ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:"
  26. ZSH_THEME_GIT_PROMPT_CLEAN=""
  27. ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
  28. ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"