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

Re: bash conversion trouble.

On 25/02/17 07:55 AM, Bart Schaefer wrote:
On Feb 25,  3:26pm, Peter Stephenson wrote:
} setopt ksharrays
} simulates this, but obviously if you want consistency with other
} functions, don't even think sbout it.

Also typically do

     setopt localoptions ksharrays

so the zero-based-ness doesn't leak out to the rest of the shell.  If
you're in a standalone script you won't be sourcing, that's not needed.

Just curious: why would that have been changed? It's the sort of thing that would obviously make trouble, and of course if there's a good reason for it, that's too bad, but what's the good reason? These zero or one based counting issues are everywhere and I've never been able to see why one is to be preferred over the other, tho zero might seem more computery and one would be more 'natural' I suppose.

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