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

* Re: Tab completion missing for --includes and branch description in git config
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Beller @ 2015-01-07 18:14 UTC (permalink / raw)
  To: Michael Paquier; +Cc: git@vger.kernel.org

On Tue, Jan 6, 2015 at 4:58 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> 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

Thanks for your effort on improving git!

Please have a look at Documentation/SubmittingPatches in git[1],
specially section "(4) Sending your patches." so discussion on the
patches is easier.

>Do not attach the patch as a MIME attachment, compressed or not.
>Do not let your e-mail client send quoted-printable.  Do not let
>your e-mail client send format=flowed which would destroy
>whitespaces in your patches. Many
>popular e-mail applications will not always transmit a MIME
>attachment as plain text, making it impossible to comment on
>your code.  A MIME attachment also takes a bit more time to
>process.  This does not decrease the likelihood of your
>MIME-attached change being accepted, but it makes it more likely
>that it will be postponed.

The easiest way to comply with all these rules outlined in SubmittingPatches
is to use git format-patch and git send-email (as they follow the best
practice).

I recently wrote about my experiences when sending patches to the git
mailing list,
including how to configure git send-email[2], maybe that helps.

Thanks,
Stefan


[1] for example it can be found at
https://raw.githubusercontent.com/git/git/master/Documentation/SubmittingPatches

[2]http://thread.gmane.org/gmane.comp.version-control.git/261900

^ permalink raw reply	[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).