Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ideas: free-search-complete, noexpand



Cosmo wrote:

> 
> Sven Wischnowsky wrote:
> 
> > Maybe we should think about developing an easy to read syntax for
> > completion control.
> 
> When I looked at compctl to do something simple I scratched my head and thought why
> can'tI just specify what the commands usage string is EG
> 
> compctl tar {txruc}[vfbFXhiBelmopw[0-7]] [tapefile] [blocksize] [exclude-file] [-
> I include-file] files ...
> 
> Should, with some casting like modification, be able to figure out at least a
> sensible default
> rule for tar argument completion.
> 

I guess many of us would like to have a real DWIM, but...

Doing something like that would require at least some serious parsing
and some guessing (what's the difference between include-file,
tape-file, and files; and for other commands the same words may have
different meanings). Also, some users may prefer to build their
compctls according to the way they normaly use the commands
(e.g. someone may use only few of the --options of some commands).

All in all, I don't think that it is possible to build a parser that
turns man-page-synopsises into the correct internal representation.

If you meant that the description should be on a somewhat higher level 
(something like: these options, or these options followed by
filenames, than an optional directory-name, then all files), then I
would like to agree, but I'm not sure, how easy we can make that
(thinking about commands like `find').

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author