[Circle-dev] Tab-complete in frontends

Kiyoshi Aman kiyoshi.aman at gmail.com
Sat Mar 28 16:49:10 GMT 2009


On Fri, Mar 27, 2009 at 6:35 AM, Paul LeoNerd Evans
<leonerd at leonerd.org.uk> wrote:
> On Wed, 25 Mar 2009 20:03:37 -0500
> Kiyoshi Aman <kiyoshi.aman at gmail.com> wrote:
>
>> It would be convenient (and, I feel,
>> more optimal) if the client (which already knows all the objects)
>> could be intelligent enough to assemble tabcompletion trees as data
>> comes in for other things and as the user tabcompletes.
>
> Well, I think this was my point. The frontend doesn't know _all_ the
> objects.

No, not *all* of them, but it knows sufficiently many to be able to
build a completion tree and to know when it ought to ask for more
data.

> It can be told easily for, say, an IRC channel, to use the names list.
> That's easy. But consider completing on command options:
>
>  /win<tab>
>
> (oh quick, we need to know all the command names. That's just a list,
> right?)
>
>  /window cl<tab>
>
> (hrm. OK. Now we need to grab its subcommands. Better instead have an
> entire tree of them)
>
>  /window close -t<tab>
>
> (ah. Now they have options. OK. Lets get those as more trees)
>
>  /window close -type=q<tab>
>
> (some of these options appear to have enumerated arguments. We should be
> able to complete on them too)
>
>  /window close -type=query
>
>
> It's not quite as simple as just a flat list of names here :)

Perhaps not, but it would be possible (and appropriate, IMO) to, at
connection time, announce the commands that the backend knows about
sufficiently that the frontend can then build us a completion tree for
those too, and a signal could be raised whenever new commands are
added (e.g. via a backend script).


More information about the Circle-dev mailing list