From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3553 invoked from network); 18 Jan 2009 14:39:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jan 2009 14:39:24 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 75258 invoked from network); 18 Jan 2009 14:39:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jan 2009 14:39:19 -0000 Received: (qmail 579 invoked by alias); 18 Jan 2009 14:39:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26356 Received: (qmail 560 invoked from network); 18 Jan 2009 14:39:14 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Jan 2009 14:39:14 -0000 Received: from mail.o2.co.uk (vader.london.02.net [82.132.130.150]) by bifrost.dotsrc.org (Postfix) with ESMTP id 4A86180271F0 for ; Sun, 18 Jan 2009 15:39:09 +0100 (CET) Received: from sc.homeunix.net (78.105.235.196) by mail.o2.co.uk (8.0.013.3) (authenticated as stephane.chazelas) id 496A3D850185AD52; Sun, 18 Jan 2009 14:39:07 +0000 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1LOYnp-0001yi-NQ; Sun, 18 Jan 2009 14:39:05 +0000 Date: Sun, 18 Jan 2009 14:39:05 +0000 From: Stephane Chazelas To: Richard Hartmann Cc: david sowerby , zsh-workers@sunsite.dk Subject: Re: select problem Message-ID: <20090118143905.GA4898@sc.homeunix.net> Mail-Followup-To: Richard Hartmann , david sowerby , zsh-workers@sunsite.dk References: <234804.32891.qm@web36605.mail.mud.yahoo.com> <20090117092515.GA5400@sc.homeunix.net> <2d460de70901170321g66b892dei2a4e5fac9c445db8@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2d460de70901170321g66b892dei2a4e5fac9c445db8@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.92.1/8874/Sun Jan 18 06:02:00 2009 on bifrost X-Virus-Status: Clean On Sat, Jan 17, 2009 at 12:21:31PM +0100, Richard Hartmann wrote: > On Sat, Jan 17, 2009 at 10:25, Stephane Chazelas > wrote: > > > "select" is not standard (that is not in the POSIX sh, which > > is the only standard you can expect both bash and zsh to conform > > to (when called as "sh")) and is a kshism. It's also rather > > useless as one can do the same thing easily without. > > zsh is not fully POSIX compliant and afaik, there are no plans to > ever make it that way, either. While zsh and POSIX agree most > of the time, using zsh as your sh _will_ get you strange effects. > > I don't have time to dig up more, but look at [1] and [2] for some > examples. [...] None of the so called POSIX shells are fully conformant. AFAIK, only AT&T ksh claims to be fully conformant. bash follows the GNU or LSB standards when they conflict with POSIX (see for instance echo -e that doesn't output -e). ash derivatives still have some way to go. But all try to be as conformant as reasonable (so long as their design choices allow and as long as implementing a POSIX feature wouln't break backward compatibility). For instance, I've never come accross a shell implementation that implements that (rather stupid IMO) POSIX feature that says that: "PATH=; echo test" should output "echo: command not found" (that is a built-in should only be invoked if a command by that name is found in $PATH). Still, I can't think of how a script could be reasonably made to rely on that behavior, which is why it's not a problem that all shells break POSIX conformance there, in a same way that running a POSIX script with zsh (in sh emulation) generally isn't a problem because it's only in corner cases that zsh is not conformant. When a POSIX conformance issue is found by someone, it is generally raised on this mailing list and most of the time fixed (at least in sh emulation). Having said that, I agree there's no much point of having zsh as your POSIX sh. -- Stéphane