From: Brandon Casey Date: Fri, 18 Jan 2013 19:24:01 +0000 (-0800) Subject: git-completion.bash: replace zsh notation that breaks bash 3.X X-Git-Tag: v1.8.4-rc1~16^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e78095c3d05712b9479211bcc7faa1d8e9bf2723;p=git 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index adeff8d9ba..67736c2a9c 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