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

bash completion only provides revs, not paths

From
Uwe Kleine-König <uwe.kleine-koenig@digi.com>
Date
Apr 22, 2008, 11:21 UTC
Message-ID
<20080422112129.GA30923@digi.com>
Hello,
currently autocompletion in 
	ukleinek@zentaur:~/gsrc/linux-2.6 git log ar<tab>

only yields "armltd/" (i.e. the prefix of some remote tracking branches) but most of the time I want it to complete to "arch/".

I don't understand that autocompletion stuff, but probably to fix that several __git_complete_revlist should be replaced by a __git_complete_revlist_or_path. The harder part is to implement the latter function. An optimal implementation would only give back paths if there is a "--" somewhere before the cursor.

Best regards Uwe

-- 
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
Next: Shawn O. Pearce
Message 1 of 5 in “bash completion only provides revs, not paths”
  1. Uwe Kleine-KönigApr 22, 2008
  2. Shawn O. PearceApr 23, 2008
  3. Uwe Kleine-KönigApr 23, 2008
  4. bash completion only provides revs, not pathsShawn O. Pearce, Apr 24, 2008
  5. Uwe Kleine-KönigApr 24, 2008

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.