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

Re: How to setup bash completion for alias of git command

From
Ping Yin <pkufranky@gmail.com>
Date
Jan 21, 2013, 03:55 UTC
Message-ID
<CACSwcnQu0qgKPhDXeDTFTZgh7FBVmaTCTkoJmEsCTUtaM9HU6g@mail.gmail.com>
In-Reply-To
<20130120111424.GG16339@elie.Belkin>
On Sun, Jan 20, 2013 at 7:14 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 18 quoted lines
> Hi Ping,
>
> Ping Yin wrote:
>>
>> However, in debian (testing, wheezy), it doesn't work
>>
>> $ gtlg or<TAB>
>> gtlg or-bash: [: 1: unary operator expected
>> -bash: [: 1: unary operator expected
>
> Yes, I can reproduce this.  "git bisect" tells me it was introduced
> by v1.7.6-rc0~65^2~4 (completion: remove unnecessary
> _get_comp_words_by_ref() invocations, 2011-04-28).  Since then, Felipe
> has done work to make reusing subcommand completion easy again, so you
> can do
>
>         __git_complete gtlg _git_log
>
Thanks very much. by following your advice, it works now.
Ping Yin
Previous: Jonathan Nieder
Message 4 of 4 in “How to setup bash completion for alias of git command”
  1. Ping YinJan 12, 2013
  2. Ping YinJan 13, 2013
  3. Jonathan NiederJan 20, 2013
  4. Ping YinJan 21, 2013

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.