zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Roger Mason <rmason@mun.ca>
Cc: zsh-users@zsh.org
Subject: Re: zparesopts odd behaviour
Date: Wed, 27 Oct 2021 23:22:16 +0200	[thread overview]
Message-ID: <90229-1635369736.574681@2LDn.bDIk.puks> (raw)
In-Reply-To: <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


  reply	other threads:[~2021-10-27 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02 18:26 Roger Mason
2021-10-27 21:22 ` Oliver Kiddle [this message]
2021-10-28  0:05   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90229-1635369736.574681@2LDn.bDIk.puks \
    --to=opk@zsh.org \
    --cc=rmason@mun.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).