Browse Source

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>
maint
Felipe Contreras 13 years ago committed by Junio C Hamano
parent
commit
3954068128
  1. 4
      contrib/completion/git-completion.bash

4
contrib/completion/git-completion.bash

@ -1658,7 +1658,7 @@ _git_notes () @@ -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 () @@ -1684,7 +1684,7 @@ _git_notes ()
prune,*)
;;
*)
case "${words[cword-1]}" in
case "$prev" in
-m|-F)
;;
*)

Loading…
Cancel
Save