summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2012-04-15 19:44:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-22 05:39:06 (GMT)
commit3954068128e1907521c19f09dca27068ce8c6945 (patch)
treea4b12499d13d1a9c2286d5bca766f90fe4d74ec1 /contrib
parent3bf421ea624fb083ea4d88fd487ae8b7b8bae06a (diff)
downloadgit-3954068128e1907521c19f09dca27068ce8c6945.zip
git-3954068128e1907521c19f09dca27068ce8c6945.tar.gz
git-3954068128e1907521c19f09dca27068ce8c6945.tar.bz2
completion: simplify by using $prev
cword-1 is the previous word ($prev). Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index db2d3cc..8c91faf 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1658,7 +1658,7 @@ _git_notes ()
__gitcomp '--ref'
;;
,*)
- case "${words[cword-1]}" in
+ case "$prev" in
--ref)
__gitcomp_nl "$(__git_refs)"
;;
@@ -1684,7 +1684,7 @@ _git_notes ()
prune,*)
;;
*)
- case "${words[cword-1]}" in
+ case "$prev" in
-m|-F)
;;
*)