juanghurtado.zsh-theme
1366 bytes
1# Color shortcuts
2RED=$fg[red]
3YELLOW=$fg[yellow]
4GREEN=$fg[green]
5WHITE=$fg[white]
6BLUE=$fg[blue]
7RED_BOLD=$fg_bold[red]
8YELLOW_BOLD=$fg_bold[yellow]
9GREEN_BOLD=$fg_bold[green]
10WHITE_BOLD=$fg_bold[white]
11BLUE_BOLD=$fg_bold[blue]
12RESET_COLOR=$reset_color
13
14# Format for git_prompt_info()
15ZSH_THEME_GIT_PROMPT_PREFIX=""
16ZSH_THEME_GIT_PROMPT_SUFFIX=""
17
18# Format for parse_git_dirty()
19ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}(*)"
20ZSH_THEME_GIT_PROMPT_CLEAN=""
21
22# Format for git_prompt_status()
23ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged"
24ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted"
25ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed"
26ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified"
27ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added"
28ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked"
29
30# Format for git_prompt_ahead()
31ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)"
32
33# Format for git_prompt_long_sha() and git_prompt_short_sha()
34ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}"
35ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
36
37USER_COLOR=$GREEN_BOLD
38[[ $UID -eq 0 ]] && USER_COLOR=$RED_BOLD
39
40# Prompt format
41PROMPT='
42%{$USER_COLOR%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
43%{$BLUE%}>%{$RESET_COLOR%} '
44RPROMPT='%{$GREEN_BOLD%}${$(git_current_branch)//\%/%%}$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'