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

Re: [PATCH] Improve error message from zparseopts -F



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