mirror of https://github.com/bjeanes/dotfiles.git
Thanks to http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ I am now showing ± as prompt char in git repos and ☿ in Hg repos
parent
abdd22288f
commit
1ce8f7e159
|
@ -10,10 +10,17 @@ function prompt_color() {
|
|||
fi
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
hg root >/dev/null 2>/dev/null && echo '☿' && return
|
||||
# echo '○'
|
||||
echo '♪'
|
||||
}
|
||||
|
||||
# Prompts
|
||||
ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg[red]%}‹"
|
||||
ZSH_THEME_VCS_PROMPT_SUFFIX="›%{$reset_color%}"
|
||||
ZSH_THEME_VCS_PROMPT_FORMAT="${ZSH_THEME_VCS_PROMPT_PREFIX}%b:%h${ZSH_THEME_VCS_PROMPT_SUFFIX}"
|
||||
|
||||
PS1='%{$fg[blue]%}$(prompt_pwd)%{$reset_color%} %{$fg[$(prompt_color)]%}♪%{$reset_color%} '
|
||||
PS1='%{$fg[blue]%}$(prompt_pwd)%{$reset_color%} %{$fg[$(prompt_color)]%}$(prompt_char)%{$reset_color%} '
|
||||
RPS1='$(${VCPROMPT} -f ${ZSH_THEME_VCS_PROMPT_FORMAT})'
|
||||
|
|
Loading…
Reference in New Issue