# Alex "oh my ZSH" theme # Based on the "Sunrise" theme, thanks! # 2015-05-05, alex@barton.de # Color shortcuts; %B sets bold text B=$fg_no_bold[blue] C=$fg_no_bold[cyan] G=$fg_no_bold[green] M=$fg_no_bold[magenta] R=$fg_no_bold[red] Y=$fg_no_bold[yellow] RESET=$reset_color [ "$UID" -eq 0 ] \ && PREFIX="%B%{$R%}-!-%{$RESET%} " \ || PREFIX="" ZSH_THEME_GIT_PROMPT_PREFIX="(%{$Y%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$RESET%}) " ZSH_THEME_GIT_PROMPT_CLEAN="%{$G%}✔" ZSH_THEME_GIT_PROMPT_DIRTY="%{$R%}✘" ZSH_THEME_GIT_PROMPT_AHEAD="%{$C%}➔" function custom_git_prompt() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/} $(parse_git_dirty)$(git_prompt_ahead)$ZSH_THEME_GIT_PROMPT_SUFFIX" } ZSH_THEME_HOSTNAME_PROMPT_PREFIX="" ZSH_THEME_HOSTNAME_PROMPT_SUFFIX="%{$RESET%}:" function custom_hostname_prompt() { [ -z "$SSH_CLIENT" ] && return echo "$ZSH_THEME_HOSTNAME_PROMPT_PREFIX$(hostname -s)$ZSH_THEME_HOSTNAME_PROMPT_SUFFIX" } local return_code="%(?..%{$R%}%? ↵%{$RESET%})" PROMPT='$(custom_hostname_prompt)%B%2~%b $(custom_git_prompt)%{$G%}%B$%b%{$RESET%} ' RPS1="${return_code}" unset LSCOLORS