From: Brandon Casey Date: Wed, 21 Aug 2013 20:49:31 +0000 (-0700) Subject: git-completion.bash: use correct Bash/Zsh array length syntax X-Git-Tag: v1.8.4.1~7^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5d5812f492dbc1adac718a69d225396620b463fd;p=git-core%2Fgit.git git-completion.bash: use correct Bash/Zsh array length syntax The syntax for retrieving the number of elements in an array is: ${#name[@]} 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 5da920ecd..e1b731307 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2580,7 +2580,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then --*=*|*.) ;; *) c="$c " ;; esac - array[$#array+1]="$c" + array[${#array[@]}+1]="$c" done compset -P '*[=:]' compadd -Q -S '' -p "${2-}" -a -- array && _ret=0