Skip to content

Commit 50c5885

Browse files
drafnelgitster
authored andcommitted
git-completion.bash: replace zsh notation that breaks bash 3.X
When commit d8b4531 began separating the zsh completion from the bash completion, it introduced a zsh completion "bridge" section into the bash completion script for zsh users to use until they migrated to the zsh script. The zsh '+=()' append-to-array notation prevents bash 3.00.15 on CentOS 4.x from loading the completion script and breaks test 9902. We can easily work around this by using standard Bash array notation. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e4f59a3 commit 50c5885

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
@@ -2431,7 +2431,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
24312431
--*=*|*.) ;;
24322432
*) c="$c " ;;
24332433
esac
2434-
array+=("$c")
2434+
array[$#array+1]="$c"
24352435
done
24362436
compset -P '*[=:]'
24372437
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0

0 commit comments

Comments
 (0)