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>

Felipe Contreras committed Apr 15, 2012 at 22:44 UTC 3954068128e1907521c19f09dca27068ce8c6945
1 file changed +2 -2
contrib/completion/git-completion.bash
+2 -2
@@ -1658,7 +1658,7 @@ _git_notes ()
1658 __gitcomp '--ref'
1659 ;;
1660 ,*)
1661 - case "${words[cword-1]}" in
1661 + case "$prev" in
1662 --ref)
1663 __gitcomp_nl "$(__git_refs)"
1664 ;;
@@ -1684,7 +1684,7 @@ _git_notes ()
1684 prune,*)
1685 ;;
1686 *)
1687 - case "${words[cword-1]}" in
1687 + case "$prev" in
1688 -m|-F)
1689 ;;
1690 *)