lkcd
[Top] [All Lists]

Re: lcrash sub-commands line completion

To: naomi@xxxxxxxxxxxxxxx, lkcd@xxxxxxxxxxx
Subject: Re: lcrash sub-commands line completion
From: "Matt D. Robinson" <yakker@xxxxxxxxxxxxxx>
Date: Fri, 12 Oct 2001 10:53:59 -0700
Organization: Alacritech, Inc.
References: <20010904162753R.naomi@xxxxxxxxxxxxxxx> <20011010100417W.naomi@xxxxxxxxxxxxxxx>
Sender: owner-lkcd@xxxxxxxxxxx
Hello, Naomi-san.  I will finish review of this patch and add it into the
code as soon as I can (probably Sunday night given my current set of
work).

--Matt

naomi@xxxxxxxxxxxxxxx wrote:
> 
> > Hello.
> > Recently, I think that lcrash should have "sub-commands line completion".
> >
> > Lcrash has many sub-commands. And almost sub-commands have parameters such 
> > as
> > filename or symbol name which should be specified.
> > The present lcrash cannot complete on sub-commands line.
> > For this reason, we have to memorize sub-commands names and parameters 
> > exactly.
> > It is very inconvenient.
> > So I'll add completion capability to librl.
> >
> > I'm considering as follows.
> > While editing sub-commands line, if TAB key is pressed, lcrash completes the
> > line (or do something as bash does).
> > Lcrash will complete on sub-commands names with behavior almost equivalent 
> > to
> > bash.
> > And I consider that parameters of sub-commands have different characteristic
> > each other, I'll add the mechanism let you be able to make your own 
> > completion
> > function. Using this mechanism, you can call the function that behaves as 
> > you
> > want when TAB key is pressed.
> 
> Hi, all.
> 
> I implemented the lcrash completion mechanism(first phase) that I mentioned
> in the above mail.
> 
> Here is the description of the mechanism.
> 
> While editing sub-commands line, if TAB key is pressed, lcrash completes the
> line.
> - When TAB key is pressed at the head of line, lcrash prints the list of
>   sub-commands names.
> - When TAB key is pressed in the middle of the first word of line, lcrash
>   completes sub-commands names.
>         * When there is no candidate, prints beep character.
>         * When there is a candidate, prints the string of it.
>         * When there are two or more candidates,
>                 + When there is the identical part of string of them, prints
>                   the string.
>                 + When there isn't the identical part of string of them,
>                   prints the list of them.
> - When TAB key is pressed on the word after the second it of line, lcrash
>   completes sub-commands arguments.
>   Note) This function is not implemented, now lcrash prints beep character.
> 
> Given below is patch against the files taken from sourceforge cvs of lkcd.
> Any comments and suggestions are welcomed.

<Prev in Thread] Current Thread [Next in Thread>