* Bash completion Issue?
@ 2006-11-04 12:36 Alan Chandler
2006-11-04 18:41 ` Shawn Pearce
0 siblings, 1 reply; 8+ messages in thread
From: Alan Chandler @ 2006-11-04 12:36 UTC (permalink / raw)
To: git
I am experiencing (and have for some time) a strange effect with bash
completion on my Debian (Unstable) system. Is this a git problem, or
something else?
When I type a normal command on the bash command line (say emacs) followed by
the partial directory name the completion completes the directory and then
adds a slash. If I type a git command (say git update-index) with the same
partial directory name it completes the directory, but then adds a space. I
have to backspace, manually add the slash, before continuing with the next
directory or filename.
In debian, there seems to be a directory /etc/bash_completion.d with files for
each of the packages, and the debian git packages have entries in there. So
I assume they are derived from the completion work mentioned on this list.
What seems strange to me is that nobody else has mentioned this before now.
--
Alan Chandler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-04 12:36 Bash completion Issue? Alan Chandler
@ 2006-11-04 18:41 ` Shawn Pearce
2006-11-05 0:33 ` Alan Chandler
0 siblings, 1 reply; 8+ messages in thread
From: Shawn Pearce @ 2006-11-04 18:41 UTC (permalink / raw)
To: Alan Chandler; +Cc: git
Alan Chandler <alan@chandlerfamily.org.uk> wrote:
> When I type a normal command on the bash command line (say emacs) followed by
> the partial directory name the completion completes the directory and then
> adds a slash. If I type a git command (say git update-index) with the same
> partial directory name it completes the directory, but then adds a space. I
> have to backspace, manually add the slash, before continuing with the next
> directory or filename.
Hmm. I just tried 'git update-index' and it completed here for
me as you want it to (this is with the current stock Git bash
completion support).
However we do some funny things when completing into trees. E.g. the
completion support for 'git ls-tree man:man<tab>' may seem a little
strange but it works well for my fingers. I've never really had
any problem with it.
I think the only way we differ from normal bash completion is we
sometimes don't add a space after fully completing a path name.
Usually the user has to type the space in by hand.
> In debian, there seems to be a directory /etc/bash_completion.d with files for
> each of the packages, and the debian git packages have entries in there. So
> I assume they are derived from the completion work mentioned on this list.
What completion script is it? The one that is now shipped as part
of Git has a header of the following, and resides in git.git as
contrib/completion/git-completion.bash:
#
# bash completion support for core Git.
#
# Copyright (C) 2006 Shawn Pearce
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
#
> What seems strange to me is that nobody else has mentioned this before now.
Maybe because you have a different completion script?
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-04 18:41 ` Shawn Pearce
@ 2006-11-05 0:33 ` Alan Chandler
2006-11-05 4:28 ` Shawn Pearce
0 siblings, 1 reply; 8+ messages in thread
From: Alan Chandler @ 2006-11-05 0:33 UTC (permalink / raw)
To: git
On Saturday 04 November 2006 18:41, Shawn Pearce wrote:
> Alan Chandler <alan@chandlerfamily.org.uk> wrote:
...
> > In debian, there seems to be a directory /etc/bash_completion.d with
> > files for each of the packages, and the debian git packages have entries
> > in there. So I assume they are derived from the completion work
> > mentioned on this list.
>
> What completion script is it? The one that is now shipped as part
> of Git has a header of the following, and resides in git.git as
> contrib/completion/git-completion.bash:
>
> #
> # bash completion support for core Git.
> #
> # Copyright (C) 2006 Shawn Pearce
> # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
> #
Well I have something like this (with git 1.4.3.3)
# 'git' bash completion and library routines used by porcelain completions.
#
# Copyright (c) Paolo Giarrusso, 2005
# Copyright (c) Ben Clifford, 2005
#
# The master version is available at:
# http://www.hawaga.org.uk/gitcompletion.git
>
> > What seems strange to me is that nobody else has mentioned this before
> > now.
>
> Maybe because you have a different completion script?
Seems like it might be:-(
--
Alan Chandler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-05 0:33 ` Alan Chandler
@ 2006-11-05 4:28 ` Shawn Pearce
2006-11-05 9:30 ` Alan Chandler
0 siblings, 1 reply; 8+ messages in thread
From: Shawn Pearce @ 2006-11-05 4:28 UTC (permalink / raw)
To: Alan Chandler; +Cc: git
Alan Chandler <alan@chandlerfamily.org.uk> wrote:
> Well I have something like this (with git 1.4.3.3)
>
> # 'git' bash completion and library routines used by porcelain completions.
> #
> # Copyright (c) Paolo Giarrusso, 2005
> # Copyright (c) Ben Clifford, 2005
> #
> # The master version is available at:
> # http://www.hawaga.org.uk/gitcompletion.git
Maybe you can nicely ask the Debian maintainer to switch to using
use the completion script that is actually shipped with git 1.4.3.3?
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-05 4:28 ` Shawn Pearce
@ 2006-11-05 9:30 ` Alan Chandler
2006-11-05 11:22 ` Alan Chandler
0 siblings, 1 reply; 8+ messages in thread
From: Alan Chandler @ 2006-11-05 9:30 UTC (permalink / raw)
To: git
On Sunday 05 November 2006 04:28, Shawn Pearce wrote:
> Maybe you can nicely ask the Debian maintainer to switch to using
> use the completion script that is actually shipped with git 1.4.3.3?
It seems to be a little bit more subtle than I first thought.
There is a separate 'git-completion' package which is not maintained by the
git maintainer (Gerrit Pape) and which has not been updated since August. Its
this package that contains the scripts.
I'll file a bug report against it.
--
Alan Chandler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-05 9:30 ` Alan Chandler
@ 2006-11-05 11:22 ` Alan Chandler
2006-11-05 11:31 ` Shawn Pearce
0 siblings, 1 reply; 8+ messages in thread
From: Alan Chandler @ 2006-11-05 11:22 UTC (permalink / raw)
To: git
On Sunday 05 November 2006 09:30, Alan Chandler wrote:
> On Sunday 05 November 2006 04:28, Shawn Pearce wrote:
> > Maybe you can nicely ask the Debian maintainer to switch to using
> > use the completion script that is actually shipped with git 1.4.3.3?
>
> It seems to be a little bit more subtle than I first thought.
>
> There is a separate 'git-completion' package which is not maintained by the
> git maintainer (Gerrit Pape) and which has not been updated since August.
> Its this package that contains the scripts.
>
> I'll file a bug report against it.
removing the git-completion package and copying the bash completion script
from /usr/share/doc/git-core/contrib/completion to /etc/bash_completion.d
solves the problem. I am getting completion working fine now.
--
Alan Chandler
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-05 11:22 ` Alan Chandler
@ 2006-11-05 11:31 ` Shawn Pearce
2006-11-05 11:45 ` Jakub Narebski
0 siblings, 1 reply; 8+ messages in thread
From: Shawn Pearce @ 2006-11-05 11:31 UTC (permalink / raw)
To: Alan Chandler; +Cc: git
Alan Chandler <alan@chandlerfamily.org.uk> wrote:
> removing the git-completion package and copying the bash completion script
> from /usr/share/doc/git-core/contrib/completion to /etc/bash_completion.d
> solves the problem. I am getting completion working fine now.
Good. :-)
Let us know if there's anything you'd like to see in the bash
completion... I just sent out two rounds of patches for it, but
certainly still have more work to do on it.
Completion of arguments to git aliases or commands like fetch and
push when --git-dir/--bare has been used is still a little buggy.
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bash completion Issue?
2006-11-05 11:31 ` Shawn Pearce
@ 2006-11-05 11:45 ` Jakub Narebski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Narebski @ 2006-11-05 11:45 UTC (permalink / raw)
To: git
Shawn Pearce wrote:
> Alan Chandler <alan@chandlerfamily.org.uk> wrote:
>> removing the git-completion package and copying the bash completion script
>> from /usr/share/doc/git-core/contrib/completion to /etc/bash_completion.d
>> solves the problem. I am getting completion working fine now.
>
> Good. :-)
>
> Let us know if there's anything you'd like to see in the bash
> completion... I just sent out two rounds of patches for it, but
> certainly still have more work to do on it.
I'd like to see completion for git-format-patch, git-cherry-pick
and git-rebase. I tried to start doing completion for git-format-patch,
but realized that I don't know bash, and bash completion enough for that.
While at it, do git-completion.bash takes into consideration that
some commands doesn't accept branch which is current branch.
Otherwise, I find git-completion for bash very useful.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-11-05 11:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-04 12:36 Bash completion Issue? Alan Chandler
2006-11-04 18:41 ` Shawn Pearce
2006-11-05 0:33 ` Alan Chandler
2006-11-05 4:28 ` Shawn Pearce
2006-11-05 9:30 ` Alan Chandler
2006-11-05 11:22 ` Alan Chandler
2006-11-05 11:31 ` Shawn Pearce
2006-11-05 11:45 ` Jakub Narebski
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).