git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Tab completion missing for --includes and branch description in git config
@ 2015-01-07  0:58 Michael Paquier
  2015-01-07 18:14 ` Stefan Beller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Paquier @ 2015-01-07  0:58 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

Hi all,

While toying with the tab completion script for bash, I found a couple
of things missing that cannot be completed:
- git config --includes
- git config branch.$BRANCH_NAME.description
Attached are trivial patches based on master to fix those things.
Regards,
-- 
Michael

[-- Attachment #2: 0001-Identify-includes-for-git-config-in-tab-completion.patch --]
[-- Type: text/x-patch, Size: 860 bytes --]

From cc463975e4a21dc523fa920db813eada881a0ccd Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@otacoo.com>
Date: Wed, 7 Jan 2015 09:43:29 +0900
Subject: [PATCH 1/2] Identify --includes for git config in tab completion

Signed-off-by: Michael Paquier <michael@otacoo.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 23988ec..d6b0754 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1891,7 +1891,7 @@ _git_config ()
 	--*)
 		__gitcomp "
 			--system --global --local --file=
-			--list --replace-all
+			--includes --list --replace-all
 			--get --get-all --get-regexp
 			--add --unset --unset-all
 			--remove-section --rename-section
-- 
2.2.1


[-- Attachment #3: 0002-Identify-description-for-git-config-in-tab-completio.patch --]
[-- Type: text/x-patch, Size: 904 bytes --]

From c2323d093b3a3a9daf0cf7e17dddff6bc028bd0e Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@otacoo.com>
Date: Wed, 7 Jan 2015 09:48:10 +0900
Subject: [PATCH 2/2] Identify description for git config in tab completion

Signed-off-by: Michael Paquier <michael@otacoo.com>
---
 contrib/completion/git-completion.bash | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d6b0754..412f74b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1900,7 +1900,9 @@ _git_config ()
 		;;
 	branch.*.*)
 		local pfx="${cur%.*}." cur_="${cur##*.}"
-		__gitcomp "remote pushremote merge mergeoptions rebase" "$pfx" "$cur_"
+		__gitcomp "
+			description remote pushremote merge mergeoptions rebase
+			" "$pfx" "$cur_"
 		return
 		;;
 	branch.*)
-- 
2.2.1


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

end of thread, other threads:[~2015-01-07 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07  0:58 Tab completion missing for --includes and branch description in git config Michael Paquier
2015-01-07 18:14 ` Stefan Beller

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).