git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add completion for short options
@ 2025-11-25  6:38 Wiktor Mis via GitGitGadget
  2025-11-25 16:42 ` Junio C Hamano
  2025-11-26 16:26 ` [PATCH v2] completion: complete "git -<TAB>" with " Wiktor Mis via GitGitGadget
  0 siblings, 2 replies; 7+ messages in thread
From: Wiktor Mis via GitGitGadget @ 2025-11-25  6:38 UTC (permalink / raw)
  To: git; +Cc: Wiktor Mis, Wiktor Mis

From: Wiktor Mis <mwiktor023@gmail.com>

Git provided completion for long options but not the short ones

Signed-off-by: Wiktor Mis <mwiktor023@gmail.com>
---
    Add completion for short options

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2100%2FWiktorro%2Fpatch-3-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2100/Wiktorro/patch-3-v1
Pull-Request: https://github.com/git/git/pull/2100

 contrib/completion/git-completion.bash | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 73abea31b4..3f1d6c0955 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -3916,6 +3916,16 @@ __git_main ()
 			--help
 			"
 			;;
+		-*)
+			__gitcomp "
+			-C
+			-P
+			-c
+			-h
+			-p
+			-v
+			"
+			;;
 		*)
 			if test -n "${GIT_TESTING_PORCELAIN_COMMAND_LIST-}"
 			then

base-commit: fd372d9b1a69a01a676398882bbe3840bf51fe72
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-12-07  0:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25  6:38 [PATCH] Add completion for short options Wiktor Mis via GitGitGadget
2025-11-25 16:42 ` Junio C Hamano
2025-11-26 16:26 ` [PATCH v2] completion: complete "git -<TAB>" with " Wiktor Mis via GitGitGadget
2025-11-26 20:09   ` Junio C Hamano
2025-11-27  7:33     ` SZEDER Gábor
2025-11-27 21:59       ` Junio C Hamano
2025-12-07  0:38         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).