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

Re: [StGIT PATCH] StGIT bash completion

From
Karl Hasselström <kha@treskal.com>
Date
Nov 16, 2006, 15:40 UTC
Message-ID
<20061116154002.GA20729@diana.vm.bytemark.co.uk>
In-Reply-To
<b0943d9e0611160621g60a0cac2r5205e37ed7d9fe9f@mail.gmail.com>
On 2006-11-16 14:21:27 +0000, Catalin Marinas wrote:
Show 10 quoted lines
> On 12/11/06, Karl Hasselström <kha@treskal.com> wrote:
>
> > A minimal bash completion script for StGIT. It completes the
> > subcommand names, and options and patch names for some
> > subcommands.
>
> Thanks for the patch. I modified it slightly to automatically
> generate the options for other commands as well (by invoking "stg
> help <command>" and it doesn't seem to be slow). I'll try to push it
> tonight.

Hmm. I'll have to try it, but I was half planning to hard-code the list of subcommands instead of calling "stg help" since it causes a tangible delay. On the machines I've tried, it easily takes 0.2 seconds to run "stg help" (with hot caches; with cold caches, it's _really_ bad), and that's bad for interactive behavior.

There's also the point that some switches need (or can benefit from) the tab completion machinery, and thus can't just be automatically extracted and used. But autocompleting the switch names shouldn't interfere with that, and hard-coding stuff that changes every now and then is both morally wrong and a lot of work.

> Thanks for the other patches as well. I included some
Ah, thanks!
>  but haven't finished them yet.

No problem. Thanks to the power of modern version control systems, I'm able to use my own branch of StGIT in the meantime, on all the various computers that I use. :-)

-- 
Karl Hasselström, kha@treskal.com
Previous: Catalin MarinasNext: Catalin Marinas
Message 4 of 6 in “StGIT bash completion”
  1. StGIT bash completionKarl Hasselström, Nov 12, 2006
  2. Shawn PearceNov 13, 2006
  3. Catalin MarinasNov 16, 2006
  4. Karl HasselströmNov 16, 2006
  5. Catalin MarinasNov 16, 2006
  6. Karl HasselströmNov 16, 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.