gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Fai update: now with shell mode


From: Jan Hudec
Subject: Re: [Gnu-arch-users] Fai update: now with shell mode
Date: Wed, 28 Jul 2004 17:05:46 +0200
User-agent: Mutt/1.5.6+20040523i

On Wed, Jul 28, 2004 at 10:17:22 -0400, Aaron Bentley wrote:
> Jan Hudec wrote:
> 
> >No, I don't really think there is a reason for such options, because to
> >complete source files, the shell completion function will just call
> >inventory.
> 
> Well, I won't rush into it.  But the "revision" completion is fairly 
> complex, and likely to get worse as I add support for the automatic 
> aliases, e.g.

That should require another options to 'complete' command. It depends on
the subcommand the completion is for only.

> >$ fai complete 'get' 'address@hidden/'
> >address@hidden/
> >aba
> >festival-gaim
> >pyaba
> >snapshot-tla
> >tla
> >tlasrc
> >fai
> >hackerlab
> >pyarch
> >test
> >tlacontrib     
> >
> >(the last one is reason for the 'prefix' -- so you don't have to repeat
> >archive, category, etc. when completing revisions...)
> 
> err, so that it shows just category names when you hit [TAB][TAB]?

Yes, zsh completion for tla does exactly that. If the archive name is
already typed, there is no need to repeat it in the list of choices. And
fai shell does that, too. (In fact, if I try 'nget
address@hidden<Tab><Tab> in fai shell, I get '1 1-CHECK 1-MIRROR'
only).

> >It's actualy a regular expression on tokens. So I would say:
> >package-versions ('--library'|'--full'|'--revisions')* <archive>
> >This is less human-readable, but more computer-readable.
> 
> Considering the intended use, more human-readable is how I'd lean.

But you need to state whether order matters and where it does not.


> >>I'd also like to specify the output format at the same time, but maybe 
> >>I'm getting ahead of myself.
> >
> >
> >Hm, a bit harder, yes.
> 
> Well, I'm thinking output formats might be "diffs", "archives", 
> "packages", "package-versions", "revisions"...
> 
> >Actualy, have you seen perl6 "regular" expressions?
> ...
> >In fact, the above example would look like:
> ><t:package-versions> (<opt:library>|<opt:full>|<opt:revisions>)* <archive>
> >
> >And since the rules have arbitrary subroutines behind them, just
> >matching that pattern agains the command-line would generate the list of
> >possible matches.
> 
> Sounds neat.

The perl6 (ir)regular expressions were designed so that it's powerful
enough to parse perl6 and easy to use enough to be used for perl6
macros.

Currently there is a compiler of the perl6 regexes to perl5 regexes
(yes, perl5 regexes do have all the features, just the syntax is so
weird it's mostly unuseable).

Since Dan Sugalski bet Guido van Rossum that parrot will run python
faster than python by OSCON 2004, running python on parrot should not be
that far future. I am not sure of the state of the state of perl6 regex
compiler for parrot, though, since perl6 is not really finalized yet.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec 
<address@hidden>

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]