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

Re: RE: _man igores global matchers



Andrej Borsenkow wrote:

> >
> > Look at _man, you'll see things like:
> >
> >   rep=( $manpath/(sman|man|cat)*/${~approx}$PREFIX${~star}$SUFFIX.*(:t) )
> >
> > I.e., it does its matching/filtering itself, before the completion code
> > has a chance to use any match specs.
> >
> > That's ugly.  But caching could be pretty costly.  Maybe we should make
> > it configurable, mentioning the problem with match specs?
> >
> > Any other ideas, anyone?
> >
> 
> Is it possible just use _path_files?
> 
> for i in $manpath; do
> _path_files -W $i '*.(bz2|z|gz|Z).<->*'
> done

Probably, but more expensive (dunno how much slower it makes it,
though).  And one would have to get rid of the paths and suffixes, which
isn't trivial.

> or like? Alternatively, it is nice having _path_files to support -O/-A
> flags. Was it not discussed somewhere?

I seem to remember that someone said it would be nice to have, but it's
so hard to implement, because we can't easily rely on the compadd-
options since they are used by _path_files itself.  On the other hand,
_path_files builds an array with the matches, but what to do with all
the prefixes and suffixes that make the calls to compadd so complicated
in _path_files?

Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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