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

[PATCH 0/3] bash-completion fixes for global git options handling

From
Peter Wu <peter@lekensteyn.nl>
Date
Oct 28, 2015, 17:21 UTC
Message-ID
<1446052885-11173-1-git-send-email-peter@lekensteyn.nl>
Hi,

These patches improve bash-completion when global git options are present. Consider this problem:

    bash-4.3$ git -C ../linux sta<TAB>error: invalid key: alias.../linux

This happens because the current script is unaware of the -C option. In general, global options are not handled well (patch 001 fixes this).

Patch 2 makes the completions more aware of the --git-dir option.
Patch 3 builds on previous patches and makes completions aware of the -C option.

Kind regards, Peter

Peter Wu (3):
  completion: ignore git options for subcommand completion
  completion: pass --git-dir to more commands
  completion: handle git -C option
 contrib/completion/git-completion.bash | 119 ++++++++++++++++++++-------------
 1 file changed, 72 insertions(+), 47 deletions(-)
-- 
2.6.1
Next: Peter Wu
Message 1 of 4 in “bash-completion fixes for global git options handling”
  1. 0/3 bash-completion fixes for global git options handlingPeter Wu, Oct 28, 2015
  2. 1/3 completion: ignore git options for subcommand completionPeter Wu, Oct 28, 2015
  3. 2/3 completion: pass --git-dir to more commandsPeter Wu, Oct 28, 2015
  4. 3/3 completion: handle git -C optionPeter Wu, Oct 28, 2015

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.