mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
update v2: a different icon displays if in a local git directory
This commit is contained in:
parent
75c52548f6
commit
a2e069c1a4
1 changed files with 7 additions and 2 deletions
|
|
@ -42,11 +42,16 @@ function git_prompt_info() {
|
|||
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIXS"
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '○' && return
|
||||
echo '>'
|
||||
}
|
||||
|
||||
# ########## PROMPT VARIABLE ###########
|
||||
|
||||
PROMPT='
|
||||
%{$fg[green]%}$(get_pwd)%{$reset_color%} 🕕 %{$fg[green]%}%*%{$reset_color%}$(put_spacing)$(git_prompt_info)
|
||||
> '
|
||||
$(prompt_char) '
|
||||
|
||||
# ########## ZSH GIT THEME VARIABLES ###########
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue