lukerandall.zsh-theme 904 B

123456789101112131415161718192021222324
  1. # ZSH Theme - Preview: https://cl.ly/f701d00760f8059e06dc
  2. # Thanks to gallifrey, upon whose theme this is based
  3. local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
  4. function my_git_prompt_info() {
  5. ref=$(git symbolic-ref HEAD 2> /dev/null) || return
  6. GIT_STATUS=$(git_prompt_status)
  7. [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
  8. echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
  9. }
  10. PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b '
  11. RPS1="${return_code}"
  12. ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
  13. ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
  14. ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
  15. ZSH_THEME_GIT_PROMPT_ADDED="+"
  16. ZSH_THEME_GIT_PROMPT_MODIFIED="*"
  17. ZSH_THEME_GIT_PROMPT_RENAMED="~"
  18. ZSH_THEME_GIT_PROMPT_DELETED="!"
  19. ZSH_THEME_GIT_PROMPT_UNMERGED="?"