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 13, 2013, 03:13 UTC
Message-ID
<CACSwcnRs3vxm0L4XrD0mUvgmQfz=qQH1yT7fX9kBwODiWcuxzQ@mail.gmail.com>
In-Reply-To
<CACSwcnQu8Rx83mcGYR6NGzEhoreNR6DfiK876LF7pa9PGm30JA@mail.gmail.com>
On Sat, Jan 12, 2013 at 10:30 PM, Ping Yin <pkufranky@gmail.com> wrote:
Show 11 quoted lines
> Following setup works for me  in ubuntu (10.04,11.04) for a long time
>
> alias gtlg='git log'
> complete -o default -o nospace -F _git_log gtlg
>
> However, in debian (testing, wheezy), it doesn't work
>
> $ gtlg or<TAB>
> gtlg or-bash: [: 1: unary operator expected
> -bash: [: 1: unary operator expected
>
with newest git version built with next branch, the same problem remains.
Ping Yin
Previous: Ping YinNext: Jonathan Nieder
Message 2 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.