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 wrote: > Brandon Casey writes: > >> On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab >> wrote: >>> Brandon Casey writes: >>> + array[$(($#array+1))]="$c" >>> >>> You don't need $(( )) since the array index is alre

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

2013-01-18 Thread Junio C Hamano
Brandon Casey writes: > On Fri, Jan 18, 2013 at 7:02 AM, Andreas Schwab wrote: >> Brandon Casey writes: >> >>> + array[$(($#array+1))]="$c" >> >> You don't need $(( )) since the array index is already evaluated as an >> arithmethic expression. > > Ah, I didn't know t

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 7:02 AM, Andreas Schwab wrote: > Brandon Casey writes: > >> + array[$(($#array+1))]="$c" > > You don't need $(( )) since the array index is already evaluated as an > arithmethic expression. Ah, I didn't know that. Thanks. I think Junio will p

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

2013-01-18 Thread Andreas Schwab
Brandon Casey 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 44D5 214B 8276

[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