aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-05-29 13:51:18 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-05-29 13:51:18 +0300
commita4b0fd6114541c688552305112a9ab9a534e8abf (patch)
treefaa1da8b25a04364ed16f0f3cf07e253b629e1dd
parent473c5c45c3554350c4fcc3b537512fea6fa6769c (diff)
POWERLEVEL9K_VCS_MAX_NUM_STAGED => POWERLEVEL9K_VCS_STAGED_MAX_NUM (with temp fallback)
-rwxr-xr-xpowerlevel9k.zsh-theme22
1 files changed, 11 insertions, 11 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 1d0e43b3..7dcd2516 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1823,17 +1823,17 @@ function _p9k_vcs_render() {
fi
if [[ $VCS_STATUS_HAS_STAGED == 1 ]]; then
_p9k_get_icon VCS_STAGED_ICON
- (( POWERLEVEL9K_VCS_MAX_NUM_STAGED != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_STAGED
+ (( ${POWERLEVEL9K_VCS_MAX_NUM_STAGED:-$POWERLEVEL9K_VCS_STAGED_MAX_NUM} != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_STAGED
_$0_fmt STAGED " $_P9K_RETVAL"
fi
if [[ $VCS_STATUS_HAS_UNSTAGED == 1 ]]; then
_p9k_get_icon VCS_UNSTAGED_ICON
- (( POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNSTAGED
+ (( ${POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED:-$POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM} != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNSTAGED
_$0_fmt UNSTAGED " $_P9K_RETVAL"
fi
if [[ $VCS_STATUS_HAS_UNTRACKED == 1 ]]; then
_p9k_get_icon VCS_UNTRACKED_ICON
- (( POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNTRACKED
+ (( ${POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED:-$POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM} != 1 )) && _P9K_RETVAL+=$VCS_STATUS_NUM_UNTRACKED
_$0_fmt UNTRACKED " $_P9K_RETVAL"
fi
if [[ $VCS_STATUS_COMMITS_AHEAD -gt 0 ]]; then
@@ -2238,9 +2238,9 @@ set_default POWERLEVEL9K_IGNORE_TERM_COLORS false
set_default POWERLEVEL9K_IGNORE_TERM_LANG false
set_default POWERLEVEL9K_DISABLE_GITSTATUS false
set_default -i POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY -1
-set_default -i POWERLEVEL9K_VCS_MAX_NUM_STAGED 1
-set_default -i POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED 1
-set_default -i POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED 1
+set_default -i POWERLEVEL9K_VCS_STAGED_MAX_NUM 1
+set_default -i POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM 1
+set_default -i POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM 1
typeset -g DEFAULT_COLOR
typeset -g DEFAULT_COLOR_INVERTED
@@ -2556,11 +2556,11 @@ _p9k_init() {
powerlevel9k_vcs_init
if [[ $POWERLEVEL9K_DISABLE_GITSTATUS != true ]] && (( ${POWERLEVEL9K_VCS_BACKENDS[(I)git]} )); then
source ${POWERLEVEL9K_GITSTATUS_DIR:-${_P9K_INSTALLATION_DIR}/gitstatus}/gitstatus.plugin.zsh
- gitstatus_start \
- -s $POWERLEVEL9K_VCS_MAX_NUM_STAGED \
- -u $POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED \
- -d $POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED \
- -m $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \
+ gitstatus_start \
+ -s ${POWERLEVEL9K_VCS_MAX_NUM_STAGED:-$POWERLEVEL9K_VCS_STAGED_MAX_NUM} \
+ -u ${POWERLEVEL9K_VCS_MAX_NUM_UNSTAGED:-$POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM} \
+ -d ${POWERLEVEL9K_VCS_MAX_NUM_UNTRACKED:-POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM} \
+ -m $POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \
POWERLEVEL9K
fi
fi