diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-09-13 01:01:06 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-09-13 01:01:06 +0300 |
commit | dfe4c109bdb4a6895dc7d58383c22bbe6313b074 (patch) | |
tree | cda8b0e006968cc5619e560fec1a21bd1dbd3b7b /powerlevel9k.zsh-theme | |
parent | 1c91430aa49c09a7a25bdd68c78cb3446bc593a7 (diff) |
Double quote to prevent globbing and word splitting in git-aheadbehind.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 2f4d7e7d..76c3c3c0 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -452,12 +452,12 @@ function +vi-git-aheadbehind() { # for git prior to 1.7 # ahead=$(git rev-list origin/${branch_name}..HEAD | wc -l) - ahead=$(git rev-list ${branch_name}@{upstream}..HEAD 2>/dev/null | wc -l) + ahead=$(git rev-list "${branch_name}"@{upstream}..HEAD 2>/dev/null | wc -l) (( ahead )) && gitstatus+=( " %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_OUTGOING_CHANGES_ICON')${ahead// /}%f" ) # for git prior to 1.7 # behind=$(git rev-list HEAD..origin/${branch_name} | wc -l) - behind=$(git rev-list HEAD..${branch_name}@{upstream} 2>/dev/null | wc -l) + behind=$(git rev-list HEAD.."${branch_name}"@{upstream} 2>/dev/null | wc -l) (( behind )) && gitstatus+=( " %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_INCOMING_CHANGES_ICON')${behind// /}%f" ) hook_com[misc]+=${(j::)gitstatus} |