On Mon, Oct 08, 2001 at 06:27:27PM +0700, qMax wrote:
> To make it possible to find matching commands and variables
> i had to grep sources and list all possible matches in script.
> To make it correctly determine type of command arg 
> (egg after /window) i have to examine all sources 
> and list command syntax in script.
> 
> Is there better solution ? 
> Is it possible ?

I was unable to find the specified script on your site, so I can't
comment on your code. I'm also not exactly sure what you're trying to
do here, but let's see if this hits the nail on the head...

Are you trying to implement command/variable completion? If so there are
some very useful builtin commands/functions you should know about.

Command completion in EPIC is accomplished via the internal function
command_completion. You can access this function via the /parsekey command.

  /parsekey command_completion

I believe this includes aliases. If not, the same method that we will use
for variable completion can be used.

See parsekey(5) in the EPIC help files.


Variable completion:

We can implement variable completion in the same way that you would implement
other types of completion. In this case we are just gathering our data from
$aliasctl() output.

  $aliasctl(assign match variable*)     /* Returns any matching variables */

See aliasctl(6) in the EPIC help files for more information.


If you want to look at my latest tabkey script you can find it packaged with
my EPIC4 script called Darkstar (found at the URL below). The tabkey stuff is
located in darkstar/modules/tabkey.dsm. Some things in the tabkey module are
specific to darkstar (mostly config stuff) so I doubt it would run standalone
without modifications. Still, it is a decent example of how to implement
certain types of completion with EPIC4 and may be useful to you.

You can find my scripts at http://www.got.net/~brian/

Hope this helps.

Brian

Attachment: msg00119/pgp00000.pgp
Description: PGP signature

Reply via email to