threads / patch / 8227

patchUpdate bash completion to ignore some more plumbing commands

Subject: [PATCH] Update bash completion to ignore some more plumbing commands

## tl;dr

3 messages between May 19, 2007 and May 22, 2007. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Jonas Fonseca· May 19, 2007, 21:35 UTC · lore
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 contrib/completion/git-completion.bash |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
 I am not sure if it is OK to exclude checkout-index as it is
 the only method of exporting the source as a directory. Also,
 I don't understand why git-diff-* is not excluded.
Show changes to contrib/completion/git-completion.bash +4 −0
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 46356e8..e758242 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -262,7 +262,9 @@ __git_commands ()
 		applypatch)       : ask gittus;;
 		archimport)       : import;;
 		cat-file)         : plumbing;;
+		check-attr)       : plumbing;;
 		check-ref-format) : plumbing;;
+		checkout-index)   : plumbing;;
 		commit-tree)      : plumbing;;
 		convert-objects)  : plumbing;;
 		cvsexportcommit)  : export;;
@@ -271,8 +273,10 @@ __git_commands ()
 		daemon)           : daemon;;
 		fast-import)      : import;;
 		fsck-objects)     : plumbing;;
+		fetch--tool)      : plumbing;;
 		fetch-pack)       : plumbing;;
 		fmt-merge-msg)    : plumbing;;
+		for-each-ref)     : plumbing;;
 		hash-object)      : plumbing;;
 		http-*)           : transport;;
 		index-pack)       : plumbing;;
-- 
1.5.2.rc3.800.ga489e-dirty

-- 
Jonas Fonseca
Shawn O. Pearce· May 21, 2007, 06:12 UTC · re: Jonas Fonseca · lore

Re: [PATCH] Update bash completion to ignore some more plumbing commands

Jonas Fonseca <fonseca@diku.dk> wrote:
> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> ---
>  contrib/completion/git-completion.bash |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
OK, sorry this missed 1.5.2.  I've applied it into my fastimport
master branch, I guess it will be in the next 1.5.2 based release.
;-)
 
>  I am not sure if it is OK to exclude checkout-index as it is
>  the only method of exporting the source as a directory. Also,

It might make sense to exclude checkout-index as plumbing, but I use it myself so often (and tab complete it too) that I want to keep it in. So I deleted that one line out of your patch when I applied it.

>  I don't understand why git-diff-* is not excluded.

Because I personally also use git diff-tree a lot. The others (diff-files, diff-index) I *never* use directly so I'm thinking maybe they should get flagged as plumbing and get removed from the completion.

-- 
Shawn.
Jonas Fonseca· May 22, 2007, 21:06 UTC · re: Shawn O. Pearce · lore

Re: [PATCH] Update bash completion to ignore some more plumbing commands

Shawn O. Pearce <spearce@spearce.org> wrote Mon, May 21, 2007:
Show 9 quoted lines
> Jonas Fonseca <fonseca@diku.dk> wrote:
> > Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
> > ---
> >  contrib/completion/git-completion.bash |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> OK, sorry this missed 1.5.2.  I've applied it into my fastimport
> master branch, I guess it will be in the next 1.5.2 based release.
> ;-)

Good! :) I didn't know, it was maintained in the fastimport branch. You might consider mentioning it in the header of the file.

Show 7 quoted lines
> >  I am not sure if it is OK to exclude checkout-index as it is
> >  the only method of exporting the source as a directory. Also,
> 
> It might make sense to exclude checkout-index as plumbing, but I
> use it myself so often (and tab complete it too) that I want to
> keep it in.  So I deleted that one line out of your patch when I
> applied it.
Very well.
Show 6 quoted lines
> >  I don't understand why git-diff-* is not excluded.
> 
> Because I personally also use git diff-tree a lot.  The others
> (diff-files, diff-index) I *never* use directly so I'm thinking
> maybe they should get flagged as plumbing and get removed from
> the completion.
OK.
-- 
Jonas Fonseca

← back to recent threads