completion: complete "git -<TAB>" with short options

"git" itself has completion for its long options and subcommands,
but not for its short options.  Add support for them.

Signed-off-by: Wiktor Mis <mwiktor023@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Wiktor Mis 2025-11-26 16:26:31 +00:00 committed by Junio C Hamano
parent 9a2fb147f2
commit 87466656fa

View File

@ -3898,7 +3898,7 @@ __git_main ()
;;
esac
case "$cur" in
--*)
-*)
__gitcomp "
--paginate
--no-pager
@ -3914,6 +3914,12 @@ __git_main ()
--namespace=
--no-replace-objects
--help
-C
-P
-c
-h
-p
-v
"
;;
*)