Skip to content

Instantly share code, notes, and snippets.

@mcy
Created January 18, 2015 23:27
Show Gist options
  • Save mcy/8604b9b1178c45d6cabd to your computer and use it in GitHub Desktop.
Save mcy/8604b9b1178c45d6cabd to your computer and use it in GitHub Desktop.
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host='%{$terminfo[bold]$fg[green]%}%n@%M%{$reset_color%}'
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
if [ $USER = 'root' ]; then
local prompt_char='%{$terminfo[bold]$fg[red]%}#'
else
local prompt_char='%B$'
fi
PROMPT="╭╼ ${user_host} ${current_dir} ${git_branch}
╰─-> ${prompt_char}%b "
RPS1="${return_code}"
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