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

Re: [BUG] getopts OPTIND



On Tue, 9 Jan 2018 16:48:17 -0600
dana <dana@xxxxxxx> wrote:
> On 9 Jan 2018, at 10:22, Francisco de Zuviría Allende <franciscodezuviria@xxxxxxxxx> wrote:
> >Execution in bash: ... OPTIND is 5, next -a
> >execution in zsh:  ... OPTIND is 4, next -r
> 
> I think this fixes it? At least, zsh gives the same output as bash and dash when
> i do this. Peter's left an ominous warning about changes to this function that
> deserves recognition though...

I've completely lost track of the cases that are real compatibility
problems and which are just broken, because, as just got quoted, the
code is pretty hair-raising anyway.

If we think we can get away with wrapping this change in
isset(POSIXBUILTINS) that will make it easier.  It doesn't sound like it
can be wrong in that case, anyway.

pws



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