2 # Based on Geoffrey Grosenbach's peepcode zsh theme from
3 # https://github.com/topfunky/zsh-simple
7 command git rev-parse --git-dir 2>/dev/null
11 command git rev-parse --short HEAD 2>/dev/null
15 if [[ -e "$repo_path/BISECT_LOG" ]]; then
17 elif [[ -e "$repo_path/MERGE_HEAD" ]]; then
19 elif [[ -e "$repo_path/rebase" || -e "$repo_path/rebase-apply" || -e "$repo_path/rebase-merge" || -e "$repo_path/../.dotest" ]]; then
25 if [[ "$repo_path" != '.' && -n "$(command git ls-files -m)" ]]; then
26 echo " %{$fg_bold[grey]%}✗%{$reset_color%}"
31 local cb=$(git_current_branch)
32 if [[ -n "$cb" ]]; then
33 local repo_path=$(git_repo_path)
34 echo " %{$fg_bold[grey]%}$cb %{$fg[white]%}$(git_commit_id)%{$reset_color%}$(git_mode)$(git_dirty)"
38 local smiley='%(?.%F{green}☺%f.%F{red}☹%f)'
41 ${VIRTUAL_ENV:+"($VIRTUAL_ENV) "}%~
44 RPROMPT='%F{white} $(ruby_prompt_info)$(git_prompt)%{$reset_color%}'
46 # Disable automatic virtualenv prompt change
47 export VIRTUAL_ENV_DISABLE_PROMPT=1