* UI and git-completion.sh
@ 2007-10-23 21:46 Paolo Ciarrocchi
2007-10-23 22:00 ` Steven Grimm
2007-10-24 10:20 ` Johannes Schindelin
0 siblings, 2 replies; 13+ messages in thread
From: Paolo Ciarrocchi @ 2007-10-23 21:46 UTC (permalink / raw)
To: git
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 list.
What people think about starting suggesting the usage of the script in the documentation?
I just want to know the opinion of the list before trying to write a documentation patch.
Next step would be to reduce the number of the items listed by git <tab> but I know there is
already a discussion about it on the list.
Regards,
Paolo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-23 21:46 UI and git-completion.sh Paolo Ciarrocchi
@ 2007-10-23 22:00 ` Steven Grimm
2007-10-23 23:44 ` Randal L. Schwartz
2007-10-24 10:20 ` Johannes Schindelin
1 sibling, 1 reply; 13+ messages in thread
From: Steven Grimm @ 2007-10-23 22:00 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: git
Paolo Ciarrocchi wrote:
> What people think about starting suggesting the usage of the script in the documentation?
>
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-23 22:00 ` Steven Grimm
@ 2007-10-23 23:44 ` Randal L. Schwartz
2007-10-23 23:54 ` Matthieu Moy
2007-10-24 17:34 ` Johannes Gilger
0 siblings, 2 replies; 13+ messages in thread
From: Randal L. Schwartz @ 2007-10-23 23:44 UTC (permalink / raw)
To: Steven Grimm; +Cc: Paolo Ciarrocchi, git
>>>>> "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!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-23 23:44 ` Randal L. Schwartz
@ 2007-10-23 23:54 ` Matthieu Moy
2007-10-24 0:01 ` Randal L. Schwartz
2007-10-24 17:34 ` Johannes Gilger
1 sibling, 1 reply; 13+ messages in thread
From: Matthieu Moy @ 2007-10-23 23:54 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: Steven Grimm, Paolo Ciarrocchi, git
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>> "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.
In zsh itself.
Completion/Unix/Command/_git
--
Matthieu
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-23 23:54 ` Matthieu Moy
@ 2007-10-24 0:01 ` Randal L. Schwartz
[not found] ` <471E91C9.3000004@midwinter.com>
2007-10-24 0:46 ` Matthieu Moy
0 siblings, 2 replies; 13+ messages in thread
From: Randal L. Schwartz @ 2007-10-24 0:01 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Steven Grimm, Paolo Ciarrocchi, git
>>>>> "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!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
[not found] ` <471E91C9.3000004@midwinter.com>
@ 2007-10-24 0:31 ` Randal L. Schwartz
2007-10-24 0:55 ` Brian Downing
0 siblings, 1 reply; 13+ messages in thread
From: Randal L. Schwartz @ 2007-10-24 0:31 UTC (permalink / raw)
To: Steven Grimm; +Cc: Matthieu Moy, Paolo Ciarrocchi, git
>>>>> "Steven" == Steven Grimm <koreth@midwinter.com> writes:
Steven> And I think we've just proven that more documentation is required
Steven> here! (I have no idea how to enable it myself; I just know I've seen
Steven> it mentioned on the list from time to time.)
Yes, so what is the process of adding the git zsh completion to any relatively
stable version of zsh? Someone here must know.
--
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!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-24 0:01 ` Randal L. Schwartz
[not found] ` <471E91C9.3000004@midwinter.com>
@ 2007-10-24 0:46 ` Matthieu Moy
2007-10-24 0:50 ` Randal L. Schwartz
1 sibling, 1 reply; 13+ messages in thread
From: Matthieu Moy @ 2007-10-24 0:46 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: Steven Grimm, Paolo Ciarrocchi, git
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>> "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?
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-24 0:46 ` Matthieu Moy
@ 2007-10-24 0:50 ` Randal L. Schwartz
0 siblings, 0 replies; 13+ messages in thread
From: Randal L. Schwartz @ 2007-10-24 0:50 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Steven Grimm, Paolo Ciarrocchi, git
>>>>> "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!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-24 0:31 ` Randal L. Schwartz
@ 2007-10-24 0:55 ` Brian Downing
2007-10-24 0:57 ` Brian Downing
0 siblings, 1 reply; 13+ messages in thread
From: Brian Downing @ 2007-10-24 0:55 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: Steven Grimm, Matthieu Moy, Paolo Ciarrocchi, git
On Tue, Oct 23, 2007 at 05:31:02PM -0700, Randal L. Schwartz wrote:
> Yes, so what is the process of adding the git zsh completion to any
> relatively stable version of zsh? Someone here must know.
I dunno the "right" way to do it, but I had this in my .zshrc file that
I presumably cargo-culted from somewhere:
fpath=( $HOME/.zsh/compfuncs $fpath )
So in addition to that, doing:
wget -O ~/.zsh/compfuncs/_git 'http://zsh.cvs.sourceforge.net/*checkout*/zsh/zsh/Completion/Unix/Command/_git'
might get you something. I guess if your zsh is too old it might be
incompatible with the completion script, though...
-bcd
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-24 0:55 ` Brian Downing
@ 2007-10-24 0:57 ` Brian Downing
0 siblings, 0 replies; 13+ messages in thread
From: Brian Downing @ 2007-10-24 0:57 UTC (permalink / raw)
To: Randal L. Schwartz; +Cc: Steven Grimm, Matthieu Moy, Paolo Ciarrocchi, git
On Tue, Oct 23, 2007 at 07:55:49PM -0500, Brian Downing wrote:
> I dunno the "right" way to do it, but I had this in my .zshrc file that
> I presumably cargo-culted from somewhere:
>
> fpath=( $HOME/.zsh/compfuncs $fpath )
I think this has to come before "compinit" or whatever starts up the new
completion engine.
-bcd
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-23 21:46 UI and git-completion.sh Paolo Ciarrocchi
2007-10-23 22:00 ` Steven Grimm
@ 2007-10-24 10:20 ` Johannes Schindelin
2007-10-24 17:07 ` Pierre Habouzit
1 sibling, 1 reply; 13+ messages in thread
From: Johannes Schindelin @ 2007-10-24 10:20 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: git
Hi,
On Tue, 23 Oct 2007, Paolo Ciarrocchi wrote:
> 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
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-24 10:20 ` Johannes Schindelin
@ 2007-10-24 17:07 ` Pierre Habouzit
0 siblings, 0 replies; 13+ messages in thread
From: Pierre Habouzit @ 2007-10-24 17:07 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Paolo Ciarrocchi, git
[-- Attachment #1: Type: text/plain, Size: 445 bytes --]
On Wed, Oct 24, 2007 at 10:20:07AM +0000, Johannes Schindelin wrote:
> BTW Pierre's idea of generating many (if not all) of these completions on
> the fly (maybe with "--help-completion"?) is intriguing.
To be fair, it's not my idea, I'm just bought to it.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: UI and git-completion.sh
2007-10-23 23:44 ` Randal L. Schwartz
2007-10-23 23:54 ` Matthieu Moy
@ 2007-10-24 17:34 ` Johannes Gilger
1 sibling, 0 replies; 13+ messages in thread
From: Johannes Gilger @ 2007-10-24 17:34 UTC (permalink / raw)
To: git
Randal L. Schwartz wrote:
> Where is it? I'm a zsh user, and would love to have git support.
>
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
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-10-24 18:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 21:46 UI and git-completion.sh Paolo Ciarrocchi
2007-10-23 22:00 ` Steven Grimm
2007-10-23 23:44 ` Randal L. Schwartz
2007-10-23 23:54 ` Matthieu Moy
2007-10-24 0:01 ` Randal L. Schwartz
[not found] ` <471E91C9.3000004@midwinter.com>
2007-10-24 0:31 ` Randal L. Schwartz
2007-10-24 0:55 ` Brian Downing
2007-10-24 0:57 ` Brian Downing
2007-10-24 0:46 ` Matthieu Moy
2007-10-24 0:50 ` Randal L. Schwartz
2007-10-24 17:34 ` Johannes Gilger
2007-10-24 10:20 ` Johannes Schindelin
2007-10-24 17:07 ` Pierre Habouzit
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).