diff options
author | Brandon Casey <drafnel@gmail.com> | 2013-08-21 13:49:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-21 16:38:47 -0700 |
commit | 5d5812f492dbc1adac718a69d225396620b463fd (patch) | |
tree | ca0f8782dcba33d885a12e774bcce0851e4839a6 /contrib | |
parent | 4d06473928ee574910accbde05c19ef2263abdf6 (diff) | |
download | git-5d5812f492dbc1adac718a69d225396620b463fd.tar.gz |
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 <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-completion.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 5da920ecd9..e1b7313072 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 |