Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2002 12:56:12 -0700
From:      Jordan K Hubbard <jkh@queasyweasel.com>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Joe Abley <jabley@automagic.org>, freebsd-arch@FreeBSD.ORG
Subject:   zsh vs bash (was Re: Scripting languages (was: Re: Package system flaws?))
Message-ID:  <922DEE83-A008-11D6-BD35-0003938C7B7E@queasyweasel.com>
In-Reply-To: <p05111707b965f0171ca4@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
Actually, I think this characterization of our decision (well, my 
decision, just to put the blame firmly where it belongs) is a little 
unfair.

The reason we switched from /bin/zsh to /bin/bash as "/bin/sh" were 
complex and not driven by bug counts so much as they were driven by 
issues like POSIX compatibility (zsh allows some of the most 
interesting constructs, like assigning values to positional parameters 
and quite a few other things which have gotten [ab]users of those 
features into trouble), performance (as measured by runtimes of some 
known shell scripts), memory and disk footprint, and finally, the fact 
that Chet is a nice guy who always responds to our emails promptly. :-)

To continue to be fair, we also did a lot of our measurements against 
zsh 3.x, which is the version of zsh we were using at the time.  I have 
seen considerable improvement put into zsh in 4.x, enough that we also 
took care to update our /bin/zsh to 4.x for Jaguar.   I still, however, 
think that the notion of /bin/bash as /bin/sh is widespread enough (and 
well-tested enough by the Linux hoards) that we did the right thing to 
switch.  What a lot of folks may not know is that /bin/bash does a 
pretty thorough job of lobotomizing itself into POSIX conformance when 
invoked as /bin/sh, preventing users from writing non-portable shell 
scripts that rely on bash-isms unless they explicitly call out to 
/bin/bash at the top (which is as it should be).

- Jordan

On Thursday, July 25, 2002, at 12:42 PM, Garance A Drosihn wrote:

> At 1:45 PM -0400 7/25/02, Joe Abley wrote:
>> Apple think zsh is good enough, fwtw:
>>
>> [jabley@hyperion]% ls -ali /bin/sh /bin/zsh
>> 6027431 -r-xr-xr-x  1 root  wheel  449616 Jul 12 19:04 /bin/sh
>> 6027442 -rwxr-xr-x  1 root  wheel  449616 Jul 12 19:04 /bin/zsh
>
> Actually, if you follow the darwin lists you'll see that Apple
> intends to switch away from zsh for /bin/sh, because they have
> too many bug reports on it.
>
> [ you might debate *why* they have so many bug reports, but
>   in any case, soon you will not be able to point to them
>   using zsh for /bin/sh]
>
> -- 
> Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
> Senior Systems Programmer           or  gad@freebsd.org
> Rensselaer Polytechnic Institute    or  drosih@rpi.edu
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-arch" in the body of the message
>
--
Jordan K. Hubbard
Engineering Manager, BSD technology group
Apple Computer


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?922DEE83-A008-11D6-BD35-0003938C7B7E>