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

3 messages from 2007-05-19 to 2007-05-22. Participants: Jonas Fonseca, Shawn O. Pearce.
Thread: https://gitlist.dev/t/8227

## Jonas Fonseca, 2007-05-19 21:35

Subject: [PATCH] Update bash completion to ignore some more plumbing commands
Message-ID: <20070519213521.GA32221@diku.dk>
URL: https://gitlist.dev/e/20070519213521.GA32221%40diku.dk

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

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, 2007-05-21 06:12

Subject: Re: [PATCH] Update bash completion to ignore some more plumbing commands
Message-ID: <20070521061228.GJ3141@spearce.org>
URL: https://gitlist.dev/e/20070521061228.GJ3141%40spearce.org
In-Reply-To: <20070519213521.GA32221@diku.dk>

```
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, 2007-05-22 21:06

Subject: Re: [PATCH] Update bash completion to ignore some more plumbing commands
Message-ID: <20070522210624.GA7518@diku.dk>
URL: https://gitlist.dev/e/20070522210624.GA7518%40diku.dk
In-Reply-To: <20070521061228.GJ3141@spearce.org>

```
Shawn O. Pearce <spearce@spearce.org> wrote Mon, May 21, 2007:
> 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.

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

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

```
