Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zparesopts odd behaviour
- X-seq: zsh-users 27297
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Roger Mason <rmason@xxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: zparesopts odd behaviour
- Date: Wed, 27 Oct 2021 23:22:16 +0200
- Archived-at: <https://zsh.org/users/27297>
- In-reply-to: <y65fsumdebk.fsf@mun.ca>
- List-id: <zsh-users.zsh.org>
- References: <y65fsumdebk.fsf@mun.ca>
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