Skip to content

Instantly share code, notes, and snippets.

@fschuindt
Created November 10, 2016 18:43
Show Gist options
  • Save fschuindt/858a507b947ac74c1c8445a80d2fa06d to your computer and use it in GitHub Desktop.
Save fschuindt/858a507b947ac74c1c8445a80d2fa06d to your computer and use it in GitHub Desktop.
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $UID -eq 0 ]]; then
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}'
local user_symbol='#'
else
local user_host='%{$terminfo[bold]$fg[grey]%}%n@%m%{$reset_color%}'
local user_symbol='$'
fi
local current_dir='%{$terminfo[bold]$fg[blue]%} %c%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
PROMPT="[${user_host} ${current_dir}${git_branch}]%B${user_symbol}%b "
RPS1="%B${return_code}%b"
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment