themes/prose: Replace collapse_pwd with a built-in version.

This commit is contained in:
Steve Losh 2010-02-01 18:43:54 -05:00
commit 26866cf4be

View file

@ -1,7 +1,3 @@
function collapse_pwd {
echo $(pwd | sed -e "s,^$HOME,~,")
}
function prompt_char { function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return hg root >/dev/null 2>/dev/null && echo '☿' && return
@ -25,7 +21,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
} }
PROMPT=' PROMPT='
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) %{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
$(virtualenv_info)$(prompt_char) ' $(virtualenv_info)$(prompt_char) '
RPROMPT='$(battery_charge)' RPROMPT='$(battery_charge)'