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

Re: bash conversion trouble.



On 25/02/17 12:09 PM, Bart Schaefer wrote:
The point is that zsh "went" before there were arrays in bash to follow.
"I'd have expected gorillas to be the same color as orangutans."
Yes, that much I know, if I stop to recall it.
} One hears nothing but bad things about csh.

Yes, the intent of zsh was to take only the good things from csh and for
everything else be like the Bourne shell (which is NOT "like bash", nor
is it even "like POSIX" which came even later).
Sure, but I've always presumed that bash is 'like' sh, for obvious reasons so the likeness would come from the parent. Why was there zsh and bash anyway? It seems to me that the goals would have been so similar that two projects were a duplication of effort.

In C it makes sense because arrays are based on pointer arithmetic so
array[0] == *(array+0) == the start of the array.  Shells don't have
such pointer arithmetic, at least not exposed by default.  That's even
the reason that $0 == the program name, because in the underlying C
the 0 element of the array passed to execve() is the program name.

Yeah, thanks for reminding me. zero base really is the more rigorously correct.



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