Created
November 10, 2016 18:43
-
-
Save fschuindt/858a507b947ac74c1c8445a80d2fa06d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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