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

Re: zparseopts and longopts



On Thu, May 12, 2016 at 4:16 AM, Atte Peltomaki <atte.peltomaki@xxxxxx> wrote:
> Executing with imaginary new option:
>
> % ./test.zsh --gnu argh --gnu-tard rms --gnu-tard-added-even-longer-opt whyohwhy
> --gnu argh
> --gnu-tard -added-even-longer-opt

Well, you've told zparseopts that --gnu-tard is an option that takes a
mandatory argument, and you have not told zparseopts that
--gnu-tard-add... is an option, and the argument of an option is
allowed to appear in the same word as the option itself (so that -a2
is the same as -a 2), so zparseopts believes -add... is the argument
of the option you told it about.



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