git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Thoughts on git-completion

From
Tim Visher <tim.visher@gmail.com>
Date
Mar 1, 2010, 20:34 UTC
Message-ID
<c115fd3c1003011234m75df37ehed54a59552f681a5@mail.gmail.com>
In-Reply-To
<20100301195751.GG24776@spearce.org>
On Mon, Mar 1, 2010 at 2:57 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 15 quoted lines
> Tim Visher <tim.visher@gmail.com> 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.
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
Previous: Shawn O. Pearce
Message 3 of 3 in “Thoughts on git-completion”
  1. Tim VisherMar 1, 2010
  2. Shawn O. PearceMar 1, 2010
  3. Tim VisherMar 1, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.