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

Re: [QUERY] How do you sort completions?

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
May 24, 2013, 18:26 UTC
Message-ID
<CALkWK0k=yGmAvOsGO+4hS6bU=Y4mJoCq6QqVoSNajBYHaPxGng@mail.gmail.com>
In-Reply-To
<CALWbr2xxND4xz49jmwXUTTr1f=Z3nmHCTQd+bBcK_Etv5oB0Fg@mail.gmail.com>
Antoine Pelisse wrote:
> I think sorting is required for faster look-up, most likely with
> dichotomic search. Otherwise it would have to search the whole list
> each time.

Oh, it's probably keeping just one copy of the completions in memory (which has to be sorted for search); this is also used to display. Makes sense, although I would have expected the shell to keep two copies: a sorted one for searching through, and another preserving the original order for displaying. I suppose they didn't think of it.

Previous: Antoine PelisseNext: Marc Khouzam
Message 7 of 8 in “[QUERY] How do you sort completions?”
  1. Ramkumar RamachandraMay 24, 2013
  2. Felipe ContrerasMay 24, 2013
  3. SZEDER GáborMay 28, 2013
  4. SZEDER GáborMay 24, 2013
  5. Ramkumar RamachandraMay 24, 2013
  6. Antoine PelisseMay 24, 2013
  7. Ramkumar RamachandraMay 24, 2013
  8. Marc KhouzamMay 24, 2013

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.