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

Re: problem with _arguments exclusion lists



Oliver Kiddle wrote:

> ...
> 
> What I was basically getting at there is something along the lines of
> [[ $PREFIX$SUFFIX = [0-9]* ]] && _message 'number'
> so that after -co, it could see that the `o' doesn't match [0-9]* and
> would only complete further options (such as -conf).

;-) I understood you, really.  But I'm pretty sure there are programs
that allow other (single letter) options after that `-c', meaning that
either `-c's argument is the empty string or that it comes in the next
word.  Or something.  So I still think we need a way to tell _arguments
that either:

1) after all `-x-:...' or `-x+:...' options other options may be
   completed, or 
2) that after some of those options other options may be completed, or
3) (what you described) that the argument of option `-x+:...' has to
   match a certain pattern and if it doesn't match, other options are to
   be completed there.

All that is independent of what we choose to use as the default.  I.e.,
if we leave the current behaviour the default or if we make completing
options there the default (unless otherwise specified).


Or maybe I'm thinking way to complicated again and we should just make
it try completing options in such places, too.  If the user has already
started typing the argument of the option, other option names won't
match anyway.  Leaves only the slight ugliness that `-c<TAB>' would
offer other single-letter options as possible completions (if _arguments
was given the -s options), even if the command doesn't allow that after
options that get an argument.


Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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