mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
Fix the collapsed-pwd.
This commit is contained in:
parent
c3be63c74d
commit
d136031d35
1 changed files with 5 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
|||
function collapse_pwd {
|
||||
echo $(pwd | sed -e "s,^$HOME,~,")
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
hg root >/dev/null 2>/dev/null && echo '☿' && return
|
||||
|
|
@ -21,7 +25,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
|
|||
}
|
||||
|
||||
PROMPT='
|
||||
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
|
||||
%{$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)
|
||||
$(virtualenv_info)$(prompt_char) '
|
||||
|
||||
RPROMPT='$(battery_charge)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue