Hi all, I just asked for help on the #git irc channel in order to install the .git-completion.sh script (thanks nessundorma) and after using it for a while I started wondering why I cannot find any reference to it the official documentation. The only important think that git grep found is: paolo@paolo-desktop:~/git$ git grep completion * Documentation/RelNotes-1.5.0.txt: - Bash completion scripts have been updated heavily. Shouldn't it be mentioned somewhere? I know that newbies are somehow scared by the following: paolo@paolo-desktop:~/git$ git- Display all 151 possibilities? (y or n) What? Do I have to learn 151 commands? No way! Using the git-completation script it all boils down to 48 commands. paolo@paolo-desktop:~/git$ git add fetch rebase am filter-branch rebase--interactive annotate format-patch relink apply fsck remote archive gc repack bisect get-tar-commit-id request-pull blame grep reset branch gui resolve bundle imap-send revert checkout init rm checkout-index instaweb send-email cherry log shortlog cherry-pick lost-found show citool ls-files show-branch clean ls-remote show-ref clone ls-tree stash commit merge status config mergetool submodule convert-objects mv tag count-objects name-rev var describe pickaxe verify-pack diff pull whatchanged diff-stages push And I think I can remove some commands from the ...
Also might be worth mentioning the zsh completion support. (I know it's there, but haven't used it -- maybe its author would care to describe it a bit?) -Steve -
>>>>> "Steven" == Steven Grimm <koreth@midwinter.com> writes: Steven> Also might be worth mentioning the zsh completion support. (I know it's there, Steven> but haven't used it -- maybe its author would care to describe it a bit?) Where is it? I'm a zsh user, and would love to have git support. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -
>>>>> "Matthieu" == Matthieu Moy <Matthieu.Moy@imag.fr> writes: Matthieu> In zsh itself. Matthieu> Completion/Unix/Command/_git Not in my version of zsh. Any chance I can add that to my 4.2.3 installation? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -
http://zsh.cvs.sourceforge.net/zsh/zsh/Completion/Unix/Command/_git Try adding it to your $fpath, hopefully, the new _git doesn't use the other new zsh features, and it will work (I have a CVS _git with a 4.3.4 zsh, and it works like a charm). -- Matthieu -
>>>>> "Matthieu" == Matthieu Moy <Matthieu.Moy@imag.fr> writes: Matthieu> http://zsh.cvs.sourceforge.net/zsh/zsh/Completion/Unix/Command/_git Matthieu> Try adding it to your $fpath, hopefully, the new _git doesn't use the Matthieu> other new zsh features, and it will work (I have a CVS _git with a Matthieu> 4.3.4 zsh, and it works like a charm). Do I add it as _git below my $fpath? Or do I need to put it into a subdir? How will it know it is there? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -
Another way to get git-completion support with zsh (works with 4.3.2) is to use the existing bash-completion and enable bash-completion for zsh via: autoload bashcompinit bashcompinit in your .zshrc or similar. Btw, if you use gentoo you can install git with bash-completion, although i suppose that most people here are not using emerge to get their git ;). Greetings, Johannes -- Johannes Gilger <heipei@hackvalue.de> http://hackvalue.de/heipei/ GPG-Key: 0x42F6DE81 GPG-Fingerprint: BB49 F967 775E BB52 3A81 882C 58EE B178 42F6 DE81 -
Hi, diff-stages just struck my eye. It is no longer in git... But AFAICS it is no longer in git-completion.bash either. Besides, I think that the number of commands could be reduced further. For example, I think that a regular user does not want to see checkout-index, citool, convert-objects, filter-branch, get-tar-commit-id, imap-send, instaweb, lost-found, ls-tree, name-rev, rebase--interactive, relink, repack, request-pull, show-ref, var, verify-pack and whatchanged. This list was not vs the quoted list, but my current list (pretty much tip of Shawn's "next". Note: I would like to complete the _options_ when one of these subcommands was specified, but I just do not want to see them when entering "git<SPACE><TAB>". BTW Pierre's idea of generating many (if not all) of these completions on the fly (maybe with "--help-completion"?) is intriguing. Ciao, Dscho -
To be fair, it's not my idea, I'm just bought to it. --=20 =C2=B7O=C2=B7 Pierre Habouzit =C2=B7=C2=B7O madcoder@debia= n.org OOO http://www.madism.org
