summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2013-01-18 19:24:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-24 15:45:49 (GMT)
commite78095c3d05712b9479211bcc7faa1d8e9bf2723 (patch)
treef25b8eed25348e55c5764dd52b33da1b21b59d82
parent6bf931a54fd66826f28d2808b7ad822024764d41 (diff)
downloadgit-e78095c3d05712b9479211bcc7faa1d8e9bf2723.zip
git-e78095c3d05712b9479211bcc7faa1d8e9bf2723.tar.gz
git-e78095c3d05712b9479211bcc7faa1d8e9bf2723.tar.bz2
git-completion.bash: replace zsh notation that breaks bash 3.X
50c5885e (git-completion.bash: replace zsh notation that breaks bash 3.X, 2013-01-18) fixed a zsh-ism introduced earlier to append to an array, which older versions of bash (3.0) did not grok. This was again broken by 734b2f05 (completion: synchronize zsh wrapper, 2013-05-08). Cherry-pick the fix again to let those with older bash use the completion script. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--contrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index adeff8d..67736c2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2663,7 +2663,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
--*=*|*.) ;;
*) c="$c " ;;
esac
- array+=("$c")
+ array[$#array+1]="$c"
done
compset -P '*[=:]'
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0