zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: Richard Hartmann <richih.mailinglist@gmail.com>
Cc: david sowerby <d_sowerby@yahoo.com>, zsh-workers@sunsite.dk
Subject: Re: select problem
Date: Sun, 18 Jan 2009 14:39:05 +0000	[thread overview]
Message-ID: <20090118143905.GA4898@sc.homeunix.net> (raw)
In-Reply-To: <2d460de70901170321g66b892dei2a4e5fac9c445db8@mail.gmail.com>

On Sat, Jan 17, 2009 at 12:21:31PM +0100, Richard Hartmann wrote:
> On Sat, Jan 17, 2009 at 10:25, Stephane Chazelas
> <Stephane_Chazelas@yahoo.fr> 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


  reply	other threads:[~2009-01-18 14:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 19:48 david sowerby
2009-01-17  7:12 ` Andrey Borzenkov
2009-01-17  9:25 ` Stephane Chazelas
2009-01-17 11:21   ` Richard Hartmann
2009-01-18 14:39     ` Stephane Chazelas [this message]
2009-01-18 15:45       ` Richard Hartmann
2009-01-20 19:42         ` Peter Stephenson
2009-01-20 21:30           ` Richard Hartmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090118143905.GA4898@sc.homeunix.net \
    --to=stephane_chazelas@yahoo.fr \
    --cc=d_sowerby@yahoo.com \
    --cc=richih.mailinglist@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).