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

Calling all bash completion experts..

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 23, 2006, 17:45 UTC
Message-ID
<Pine.LNX.4.64.0611230935520.27596@woody.osdl.org>

So, I'm a happy but clueless user of the bash completion, and one thing drives me wild: when it has found an exclusive completion, it doesn't add the final space at the end, but just beeps at you when you <tab> again.

So I do "git repa<tab>" and get "git repack", which is fine, but I really _wanted_ to get "git repack " (with the space at the end), since I've now got a unique command, and that's the normal completion behaviour (ie I want it to act the same way that "git-repa<tab>" would have acted).

The same is true of filename arguments, btw:
	git commit cont<tab>com<tab><tab>
gives me
	git commit contrib/completion/git-completion.bash

but again, it doesn't seem to do the right thing about the fact that it was the unique choice, so it didn't add the final space, and when you press <tab> more to get what the other choices are, it doesn't show you any other choices (because there are none).

Now, without knowing the completion syntax, I assume it's the "-o nospace" things in the completion file. So I'm wondering _why_ that "nospace" is there, and whether this could be fixed?

Next: Shawn Pearce
Message 1 of 4 in “Calling all bash completion experts..”
  1. Linus TorvaldsNov 23, 2006
  2. Shawn PearceNov 25, 2006
  3. Linus TorvaldsNov 25, 2006
  4. Shawn PearceNov 26, 2006

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.