[PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Brandon Casey
When commit d8b45314 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

Re: [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Andreas Schwab
Brandon Casey draf...@gmail.com writes: + array[$(($#array+1))]=$c You don't need $(( )) since the array index is already evaluated as an arithmethic expression. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3

Re: [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Junio C Hamano
Brandon Casey draf...@gmail.com writes: On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab sch...@linux-m68k.org wrote: Brandon Casey draf...@gmail.com writes: + array[$(($#array+1))]=$c You don't need $(( )) since the array index is already evaluated as an

Re: [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X

2013-01-18 Thread Brandon Casey
On Fri, Jan 18, 2013 at 11:08 AM, Junio C Hamano gits...@pobox.com wrote: Brandon Casey draf...@gmail.com writes: On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab sch...@linux-m68k.org wrote: Brandon Casey draf...@gmail.com writes: + array[$(($#array+1))]=$c