zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: srb@cuci.nl (Stephen R. van den Berg),
	zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: Procmail rejects zsh as being "broken"
Date: Thu, 01 Aug 1996 13:43:23 +0200	[thread overview]
Message-ID: <199608011143.NAA17587@hydra.ifh.de> (raw)
In-Reply-To: "srb@cuci.nl"'s message of "Thu, 01 Aug 1996 13:29:46 MET." <199608011129.NAA17916@hera.cuci.nl>

srb@cuci.nl wrote:
> The test should have read (fixed in the next release :-):
> 
>         *zsh*) $RM src/_autotst
>             $SHELL <<HERE
>             O="echo test"
>             exec 2>$DEVNULL 1>&2
>             \$O && echo test >src/_autotst
> HERE
> 
> As to why it is just being tested on zsh, well, that's the only shell
> that (ever) exhibited this (broken) behaviour.

It's *not* broken.  See the FAQ.  Zsh has arrays if you want the
variable to have separate words.  Having it splitting on every single
space in every single variable is the broken behaviour, inherited from
the time when arrays didn't exist.  None of the developers think this
should be the default behaviour (I have never heard any dissenters,
feel free to speak out).  The default behaviour is different in more
subtle ways anyway.  The object is to make a usable shell, not one
with every builtin historical limitation.

To more practical matters:  I suggest the test be

        *zsh*) $RM src/_autotst
	    setopt shwordsplit
            $SHELL <<HERE
            O="echo test"
            exec 2>$DEVNULL 1>&2
            \$O && echo test >src/_autotst
HERE

(i.e. with the added setopt line) since it's zsh-specific anyway.
This works in all versions of zsh to implement the sh behaviour.

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


  reply	other threads:[~1996-08-01 13:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-01  8:28 Andrej Borsenkow
1996-08-01  8:40 ` Peter Stephenson
1996-08-01 11:29 ` Stephen R. van den Berg
1996-08-01 11:43   ` Peter Stephenson [this message]
1996-08-01 12:04     ` Zefram
1996-08-01 12:11       ` Peter Stephenson
1996-08-01 12:33         ` Zefram
1996-08-01 13:00           ` Peter Stephenson
1996-08-01 12:23     ` Stephen R. van den Berg
1996-08-01 13:02       ` Zoltan Hidvegi
1996-08-01 13:07         ` Bruce Stephens
1996-08-01 14:44         ` Stephen R. van den Berg
1996-08-01 14:59           ` Zoltan Hidvegi
1996-08-02  0:54             ` Zefram
1996-08-02  0:59           ` Zefram
1996-08-02  1:20             ` Stephen R. van den Berg

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=199608011143.NAA17587@hydra.ifh.de \
    --to=pws@ifh.de \
    --cc=srb@cuci.nl \
    --cc=zsh-workers@math.gatech.edu \
    /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).