completion: treat "branch -D" the same way as "branch -d"
The former offers not just branches but tags as completion candidates. Mimic how "branch -d" limits its suggestion to branch names. Reported-by: Paul Jolly <paul@myitcv.io> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
71ca53e812
commit
a534cf4f4d
@ -1438,7 +1438,7 @@ _git_branch ()
|
|||||||
while [ $c -lt $cword ]; do
|
while [ $c -lt $cword ]; do
|
||||||
i="${words[c]}"
|
i="${words[c]}"
|
||||||
case "$i" in
|
case "$i" in
|
||||||
-d|--delete|-m|--move) only_local_ref="y" ;;
|
-d|--delete|-D|-m|--move) only_local_ref="y" ;;
|
||||||
-r|--remotes) has_r="y" ;;
|
-r|--remotes) has_r="y" ;;
|
||||||
esac
|
esac
|
||||||
((c++))
|
((c++))
|
||||||
|
Reference in New Issue
Block a user