Skip to content

Instantly share code, notes, and snippets.

@rymdolle
Last active June 12, 2017 18:26
Show Gist options
  • Save rymdolle/04fdc54375d979c267b4d77b964f3801 to your computer and use it in GitHub Desktop.
Save rymdolle/04fdc54375d979c267b4d77b964f3801 to your computer and use it in GitHub Desktop.
# VCS
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}"
YS_VCS_PROMPT_SUFFIX="%{$reset_color%}"
YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}x"
YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}o"
# Git info
local git_info='$(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}git${YS_VCS_PROMPT_PREFIX2}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY"
ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
local exit_code="%(?,,C:%{$fg[red]%}%?%{$reset_color%})"
PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
%(#,%{$bg[yellow]%}%{$fg[black]%}%n%{$reset_color%},%{$fg[cyan]%}%n) \
%{$fg[white]%}@ \
%{$fg[${${SSH_CLIENT+yellow}:-green}]%}%m \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
${git_info} \
$exit_code
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment