Skip to content

Instantly share code, notes, and snippets.

@supersha
Created June 8, 2014 04:33
Show Gist options
  • Save supersha/d4e5efecb7d857b7fbc9 to your computer and use it in GitHub Desktop.
Save supersha/d4e5efecb7d857b7fbc9 to your computer and use it in GitHub Desktop.
local ret_status="%(?:%{$fg_bold[green]%}?~^~\ :%{$fg_bold[red]%}?~^~\ %s)"
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}?~\~W%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})%{$fg[green]%} ?~\~T %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}?~\~Z%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}?~\?%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}?~\~V%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}?~^~\%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}?~U~P%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}?~\?%{$reset_color%} "
function prompt_char {
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo "%{$reset_color%}$ "; fi
}
PROMPT='%{$fg[magenta]%}%n%{$fg[magenta]%}@%{$fg[magenta]%}%m%{$reset_color%}: %{$fg[blue]%}(%{$fg_bold[blue]%}%~%{$reset_color%}%{$fg[blue]%}) $(git_prompt_info)$(git_prompt_status)%_$(prompt_char)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment