Add "_UNTRACKED" option for _VCS to change colors - default yellow
This commit is contained in:
parent
3b7dfff7ea
commit
d7c26513c8
|
@ -730,6 +730,8 @@ prompt_vcs() {
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
|
||||||
VCS_WORKDIR_DIRTY=false
|
VCS_WORKDIR_DIRTY=false
|
||||||
|
VCS_WORKDIR_HALF_DIRTY=false
|
||||||
|
|
||||||
VCS_CHANGESET_PREFIX=''
|
VCS_CHANGESET_PREFIX=''
|
||||||
if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then
|
if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then
|
||||||
# Default: Just display the first 12 characters of our changeset-ID.
|
# Default: Just display the first 12 characters of our changeset-ID.
|
||||||
|
@ -774,11 +776,15 @@ prompt_vcs() {
|
||||||
if [[ "$VCS_WORKDIR_DIRTY" == true ]]; then
|
if [[ "$VCS_WORKDIR_DIRTY" == true ]]; then
|
||||||
# $vcs_visual_identifier gets set in +vi-vcs-detect-changes in functions/vcs.zsh,
|
# $vcs_visual_identifier gets set in +vi-vcs-detect-changes in functions/vcs.zsh,
|
||||||
# as we have there access to vcs_info internal hooks.
|
# as we have there access to vcs_info internal hooks.
|
||||||
"$1_prompt_segment" "$0_MODIFIED" "$2" "yellow" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
"$1_prompt_segment" "$0_MODIFIED" "$2" "red" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
||||||
|
else
|
||||||
|
if [[ "$VCS_WORKDIR_HALF_DIRTY" == true ]]; then
|
||||||
|
"$1_prompt_segment" "$0_UNTRACKED" "$2" "yellow" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
||||||
else
|
else
|
||||||
"$1_prompt_segment" "$0" "$2" "green" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
"$1_prompt_segment" "$0" "$2" "green" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Vi Mode: show editing mode (NORMAL|INSERT)
|
# Vi Mode: show editing mode (NORMAL|INSERT)
|
||||||
|
|
Loading…
Reference in New Issue