aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2016-02-05 21:59:33 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-02-05 21:59:33 +0300
commit4bbff138fbad9724cc04d164af30d08aea716e1d (patch)
tree1064665a3bb627944f1951875f1a09b6fe511a2c /powerlevel9k.zsh-theme
parent4897c795faf557c16d0d337f5e493ba1e4071aa0 (diff)
parent177bfc96021d101ff0caa4a1ac55d8fb0f117ba7 (diff)
Merging @theminor's changes from PR #204
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme10
1 files changed, 8 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index f48f97b2..76ff5497 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -750,6 +750,8 @@ prompt_vcs() {
autoload -Uz vcs_info
VCS_WORKDIR_DIRTY=false
+ VCS_WORKDIR_HALF_DIRTY=false
+
VCS_CHANGESET_PREFIX=''
if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then
# Default: Just display the first 12 characters of our changeset-ID.
@@ -796,9 +798,13 @@ prompt_vcs() {
if [[ "$VCS_WORKDIR_DIRTY" == true ]]; then
# $vcs_visual_identifier gets set in +vi-vcs-detect-changes in functions/vcs.zsh,
# 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
- "$1_prompt_segment" "$0" "$2" "green" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
+ if [[ "$VCS_WORKDIR_HALF_DIRTY" == true ]]; then
+ "$1_prompt_segment" "$0_UNTRACKED" "$2" "yellow" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
+ else
+ "$1_prompt_segment" "$0" "$2" "green" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
+ fi
fi
fi
}