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: Aaron Bentley
Subject: Re: [Gnu-arch-users] Fai update: now with shell mode
Date: Wed, 28 Jul 2004 10:17:22 -0400
User-agent: Mozilla Thunderbird 0.5 (X11/20040309)

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.

Fai> nget t[TAB]
tmod
tcur
address@hidden

Fai> nget tcur:[TAB]
[list of archives, packages, versions]

$ 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]?

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.

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.

Ah.  I'll apply that fix.


Please test it a bit, though.

Sure thing.  Else, I'd have said "I've applied that fix". :-)

Aaron
--
Aaron Bentley
Director of Technology
Panometrics, Inc.




reply via email to

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