git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Paquier <michael.paquier@gmail.com>
To: git@vger.kernel.org
Subject: Tab completion missing for --includes and branch description in git config
Date: Wed, 7 Jan 2015 09:58:27 +0900	[thread overview]
Message-ID: <CAB7nPqRnDTEXWEDUHX7xJG_+QvoXdt2aA6RLRn4Hiq-rOZMEmQ@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2015-01-07  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07  0:58 Michael Paquier [this message]
2015-01-07 18:14 ` Tab completion missing for --includes and branch description in git config Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB7nPqRnDTEXWEDUHX7xJG_+QvoXdt2aA6RLRn4Hiq-rOZMEmQ@mail.gmail.com \
    --to=michael.paquier@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).