Skip to content

Instantly share code, notes, and snippets.

@app2641
Created May 19, 2016 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save app2641/9b8387f2c3e37fcf5531467a40c744c4 to your computer and use it in GitHub Desktop.
Save app2641/9b8387f2c3e37fcf5531467a40c744c4 to your computer and use it in GitHub Desktop.
# prompt
export ZSH_THEME_GIT_PROMPT_DIRTY="%{%}% ✗"
export ZSH_THEME_GIT_PROMPT_CLEAN=""
function parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/'
}
DEFAULT=$'\U1F430 '
ERROR=$'\U1F363 '
export PS1="%{%}
%{%}%n %{%}%~%{%}\$(parse_git_dirty)
%(?|%{%}${DEFAULT}|%{%}${ERROR})%{%}\$(parse_git_branch) %{%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment