Skip to content

Instantly share code, notes, and snippets.

@jhsu
Created April 1, 2010 13:22
Show Gist options
  • Save jhsu/351789 to your computer and use it in GitHub Desktop.
Save jhsu/351789 to your computer and use it in GitHub Desktop.
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '○'
}
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
$(prompt_char) '
RPROMPT="..."
# git theming
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg_no_bold[yellow]%}%B"
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[red]%}\u2620%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment