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

Re: broken bash completion

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 5, 2012, 13:11 UTC
Message-ID
<CAMP44s0q_zeVwzhgeda1=9+Psjr5PaO1QtHT1QC0RwyCpfd=rg@mail.gmail.com>
In-Reply-To
<20120505121319.GG2164@goldbirke>
On Sat, May 5, 2012 at 2:13 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:
Show 9 quoted lines
> But you miss an important point here: users expect the completion to
> be pretty fast, because delays are quite noticeable and annoying while
> typing a command.  So there's a trade-off between correctness and
> usability.  Unfortunately, in the real world all that filtering costs
> a great deal, so git's completion script does that only if it can be
> done cheaply (e.g. 'git rebase --<TAB>' won't offer you '--abort' and
> '--continue' if you're not in the middle of an ongoing rebase).  And
> as pointed out above, something might be nonsense for a command, but
> still be useful for the user.
Completely agree with this.

The reason I started to use the bash completion in zsh is that the zsh completion goes for 100% correctness, that means 'git checkout <TAB>' took literally *minutes* in my machine on the Linux kernel repo. The zsh developers said that was OK, and my patch to solve the problem was not, because it would make the result less than 100% correct.

The whole point of completion is to avoid typing as much as possible, and if typing something is faster than doing the completion; the completion is pointless. It has to be fast.

Cheers.
-- 
Felipe Contreras
Previous: Andreas SchwabNext: fREW Schmidt
Message 6 of 8 in “broken bash completion”
  1. Rolf LeggewieMay 2, 2012
  2. SZEDER GáborMay 4, 2012
  3. Rolf LeggewieMay 5, 2012
  4. SZEDER GáborMay 5, 2012
  5. Andreas SchwabMay 5, 2012
  6. Felipe ContrerasMay 5, 2012
  7. fREW SchmidtMay 5, 2012
  8. Felipe ContrerasMay 5, 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.