diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-11-06 03:11:31 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-11-06 03:11:31 +0300 |
commit | 48f0cc11effbeff3e8cc3c80736d789c78905083 (patch) | |
tree | c6ef4b9cdb27b36044e146784901b5217955cca2 /functions | |
parent | 23f0a1ddccc796c013af79c47db552279e593b71 (diff) |
Get rid of externals when truncating branch name
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/vcs.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functions/vcs.zsh b/functions/vcs.zsh index 3b3b938f..2b1a7296 100755 --- a/functions/vcs.zsh +++ b/functions/vcs.zsh @@ -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 |