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

Re: zparesopts odd behaviour



On 2 Sep, Roger Mason wrote:
> ./testopts.sh  --sc1 5.5 --sc2 5.5 --sc3 8.0 --sc 1.5

zparseopts allows values to appear immediately after the option. So
--sc3 is taken as being the same as --sc 3
So it thinks you have four --sc options and only the last is kept.

zparseopts was designed for splicing up options to completion functions
where it is common to change them before passing a subset on to other
functions. It may not be ideally suited to other situations.

Oliver




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