mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge 05cfadc5d8 into ccbe504f22
This commit is contained in:
commit
9e3a2d341e
1 changed files with 7 additions and 1 deletions
|
|
@ -114,6 +114,8 @@ prompt_git() {
|
|||
ref="➦ $(command git rev-parse --short HEAD 2> /dev/null)"
|
||||
if [[ -n $dirty ]]; then
|
||||
prompt_segment yellow black
|
||||
elif [[ "$(git config --get oh-my-zsh.hide-dirty 2>/dev/null)" = 1 ]]; then
|
||||
prompt_segment white black
|
||||
else
|
||||
prompt_segment green $CURRENT_FG
|
||||
fi
|
||||
|
|
@ -142,7 +144,11 @@ prompt_git() {
|
|||
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' get-revision true
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
if [[ -z $dirty ]]; then
|
||||
zstyle ':vcs_info:*' check-for-staged-changes true
|
||||
else
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
fi
|
||||
zstyle ':vcs_info:*' stagedstr '✚'
|
||||
zstyle ':vcs_info:*' unstagedstr '±'
|
||||
zstyle ':vcs_info:*' formats ' %u%c'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue