diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2018-11-06 17:12:04 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-06 17:12:04 +0300 |
commit | 78df520772135b7924d6fc84f2bdbde0f1c650b2 (patch) | |
tree | 4badecf52f4f327e0d32fdf98ea24bcfb9d8cabc /functions | |
parent | 23f0a1ddccc796c013af79c47db552279e593b71 (diff) | |
parent | 2038e2650cf40ce6ad6959a6fd5fa9c52863b2cb (diff) |
Merge pull request #1055 from dritter/speedup_vcs_master2
Backporting VCS speedups to master
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/vcs.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh index 3b3b938f..321a1502 100755 --- a/functions/vcs.zsh +++ b/functions/vcs.zsh @@ -8,7 +8,7 @@ set_default POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY false function +vi-git-untracked() { - if [[ "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" && "$(command git submodule foreach --quiet --recursive 'git ls-files --others --exclude-standard')" != "" ]]; then + if [[ "$POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY" == "true" && "$(command git submodule foreach --quiet --recursive 'command git ls-files --others --exclude-standard')" != "" ]]; then hook_com[unstaged]+=" $(print_icon 'VCS_UNTRACKED_ICON')" VCS_WORKDIR_HALF_DIRTY=true elif [[ "$(command git ls-files --others --exclude-standard)" != "" ]]; then @@ -46,13 +46,13 @@ function +vi-git-remotebranch() { if [[ -n "$POWERLEVEL9K_VCS_SHORTEN_LENGTH" ]] && [[ -n "$POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH" ]]; then set_default POWERLEVEL9K_VCS_SHORTEN_DELIMITER $'\U2026' - if [ ${#hook_com[branch]} -gt $POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH ] && [ ${#hook_com[branch]} -gt $POWERLEVEL9K_VCS_SHORTEN_LENGTH ]; then + if [ ${#hook_com[branch]} -gt ${POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH} ] && [ ${#hook_com[branch]} -gt ${POWERLEVEL9K_VCS_SHORTEN_LENGTH} ]; then case "$POWERLEVEL9K_VCS_SHORTEN_STRATEGY" in truncate_middle) - hook_com[branch]="$(echo "${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}")$POWERLEVEL9K_VCS_SHORTEN_DELIMITER$(echo "${branch_name: -$POWERLEVEL9K_VCS_SHORTEN_LENGTH}")" + hook_com[branch]="${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}${POWERLEVEL9K_VCS_SHORTEN_DELIMITER}${branch_name: -$POWERLEVEL9K_VCS_SHORTEN_LENGTH}" ;; truncate_from_right) - hook_com[branch]="$(echo "${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}")$POWERLEVEL9K_VCS_SHORTEN_DELIMITER" + hook_com[branch]="${branch_name:0:$POWERLEVEL9K_VCS_SHORTEN_LENGTH}${POWERLEVEL9K_VCS_SHORTEN_DELIMITER}" ;; esac fi |