OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d06473
)
git-completion.bash: use correct Bash/Zsh array length syntax
author
Brandon Casey
<drafnel@gmail.com>
Wed, 21 Aug 2013 20:49:31 +0000
(13:49 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 21 Aug 2013 23:38:47 +0000
(16:38 -0700)
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>
contrib/completion/git-completion.bash
patch
|
blob
|
history
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index
5da920e
..
e1b7313
100644
(file)
--- 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