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

Re: PATCH: Re: sudo completion problem



In article <000501bfb728$30dd2f40$21c9ca95@xxxxxxxxxxxxxx>,
  "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx> writes:

> - can somebody comment on long options case - is it expected behaviour?
> Note, that I mean in this case "GNU long options". In this case, again,
> _arguments should differentiate bewteen long and short case, again with
> option. There are enough commands out there that use "long" options but
> not GNU ones.

It's not differences between long and short.  It's caused by the
difference between traditional getopt and GNU getopt.

By default, GNU getopt permutes argv and finds options on anywhere
(until `--').

If we can easily find out whether a command is linked with GNU getopt
or not, we can (and should) complete correctly.

But I think the current behavior is not bad because it completes all
correct (and some non-correct) candidates.  If _arguments behavior is
changed as you said, it completes only subset of correct candidates.
-- 
Tanaka Akira



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