Thoughts on git-completion

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Thoughts on git-completion

From: Tim Visher <hidden>
Date: 2016-06-15 22:48:22

Hello Everyone,

I `alias g=git` and `alias gk=gitk` on every machine that I use git on
and I have to edit the git-completion.bash script in order to get the
marvelous completion provided by that script with my aliases.  Is this
something that could be rolled in to the official release or does this
rest firmly in the personal customization realm?  I'm prepared to
submit a patch if you'd like.

Thoughts?

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail

Re: Thoughts on git-completion

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:48:22

Tim Visher [off-list ref] wrote:
I `alias g=git` and `alias gk=gitk` on every machine that I use git on
and I have to edit the git-completion.bash script in order to get the
marvelous completion provided by that script with my aliases.  Is this
something that could be rolled in to the official release or does this
rest firmly in the personal customization realm?  I'm prepared to
submit a patch if you'd like.
Does adding to your local script

  complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \
  || complete -o default -o nospace -F _git g

work for you?  It seems to me you just need to tell bash to run
_git or _gitk when doing completion for your alias.

-- 
Shawn.

Re: Thoughts on git-completion

From: Tim Visher <hidden>
Date: 2016-06-15 22:48:22

On Mon, Mar 1, 2010 at 2:57 PM, Shawn O. Pearce [off-list ref] wrote:
Tim Visher [off-list ref] wrote:
quoted
I `alias g=git` and `alias gk=gitk` on every machine that I use git on
and I have to edit the git-completion.bash script in order to get the
marvelous completion provided by that script with my aliases.  Is this
something that could be rolled in to the official release or does this
rest firmly in the personal customization realm?  I'm prepared to
submit a patch if you'd like.
Does adding to your local script

 complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \
 || complete -o default -o nospace -F _git g

work for you?  It seems to me you just need to tell bash to run
_git or _gitk when doing completion for your alias.
The patch that I use is:

    2290a2291,2295
    > complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \
    >        || complete -o default -o nospace -F _git g
    > complete -o bashdefault -o default -o nospace -F _gitk gk 2>/dev/null \
    >        || complete -o default -o nospace -F _gitk gk

-- 

In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help