mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01: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"
|
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 VARIABLE ###########
|
||||||
|
|
||||||
PROMPT='
|
PROMPT='
|
||||||
%{$fg[green]%}$(get_pwd)%{$reset_color%} 🕕 %{$fg[green]%}%*%{$reset_color%}$(put_spacing)$(git_prompt_info)
|
%{$fg[green]%}$(get_pwd)%{$reset_color%} 🕕 %{$fg[green]%}%*%{$reset_color%}$(put_spacing)$(git_prompt_info)
|
||||||
> '
|
$(prompt_char) '
|
||||||
|
|
||||||
# ########## ZSH GIT THEME VARIABLES ###########
|
# ########## ZSH GIT THEME VARIABLES ###########
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue