Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Improve error message from zparseopts -F
- X-seq: zsh-workers 47902
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Joshua Krusell <js.shirin@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Improve error message from zparseopts -F
- Date: Wed, 3 Feb 2021 11:28:46 +0000
- Archived-at: <https://zsh.org/workers/47902>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/20210203112846.GC12261%40tarpaulin.shahaf.local2>
- In-reply-to: <20210202221728.371739-1-js.shirin@gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20210202221728.371739-1-js.shirin@gmail.com>
Joshua Krusell wrote on Tue, Feb 02, 2021 at 23:17:28 +0100:
> I see that this was the original intended behaviour in the V12zparseopts
> tests, so ignore if I've missed something.
> +++ b/Test/V12zparseopts.ztst
> @@ -69,7 +69,7 @@
> >ret: 1, optv: , argv: -a -x -z
> ?(anon):zparseopts:2: bad option: x
> >ret: 1, optv: , argv: -ax -z
> -?(anon):zparseopts:2: bad option: -
> +?(anon):zparseopts:2: bad option: -x
> >ret: 1, optv: , argv: -a --x -z
Haven't tested, but this sounds perfectly reasonable to me. If anything, I'd
say go a step further and add the first minus sign as well: referring the the
«--x» option as «-x» could be confusing (or even misleading, if there happens
to actually be a -x option).
And the same thing on line 70, I suppose?
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author