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

git-completion with bash alias

From
CMCarsten Mattner <carstenmattner@googlemail.com>
Date
May 18, 2012, 11:35 UTC
Message-ID
<CACY+Hvqd6L7gWgDBvjPmLPsfA2o1CVKuqkDZ_j7XYf=WjuwvKQ@mail.gmail.com>

Completion works when used as "git checkout foo" but fails with "bash: [: 1: unary operator expected" when trying to complete via a single character shell alias like "alias g=git" as in "g checkout foo".

git version 1.7.10.2.548.g9de9681
Next: Jeff King
Message 1 of 5 in “git-completion with bash alias”
  1. Carsten MattnerMay 18, 2012
  2. Jeff KingMay 19, 2012
  3. Felipe ContrerasMay 19, 2012
  4. Carsten MattnerMay 19, 2012
  5. Carsten MattnerMay 19, 2012

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.