mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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>
This commit is contained in:
parent
4d06473928
commit
5d5812f492
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue