Skip to contentSkip to conversation

Update bash completion to ignore some more plumbing commands

PATCH In review Jonas Fonseca 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update bash completion to ignore some more plumbing commands

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

contrib/completion/git-completion.bash +4 -0
index 46356e8..e758242 100755
@@ -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;;
Signature · 4 lines
1.5.2.rc3.800.ga489e-dirty

-- 
Jonas Fonseca
#1 lore raw
Quoted 4 lines · Jonas Fonseca
---
 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. ;-)

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

Quoted 1 line

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.

Signature · 1 line
Shawn.
#2 lore raw

Shawn O. Pearce <[email protected]> wrote Mon, May 21, 2007:

Quoted 9 lines
Quoted 4 lines · Jonas Fonseca
---
 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.

Quoted 7 lines
Quoted 2 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.

Quoted 6 lines
Quoted 1 line

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.

Signature · 1 line
Jonas Fonseca