Skip to content

Commit e78095c

Browse files
drafnelgitster
authored andcommitted
git-completion.bash: replace zsh notation that breaks bash 3.X
50c5885 (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 734b2f0 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6bf931a commit e78095c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2663,7 +2663,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
26632663
--*=*|*.) ;;
26642664
*) c="$c " ;;
26652665
esac
2666-
array+=("$c")
2666+
array[$#array+1]="$c"
26672667
done
26682668
compset -P '*[=:]'
26692669
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0

0 commit comments

Comments
 (0)