From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: borsenkow.msk@sni.de
Cc: zsh-workers@math.gatech.edu
Subject: Re: sh compatibility again :->
Date: Mon, 12 Aug 1996 04:18:57 +0200 (MET DST) [thread overview]
Message-ID: <199608120218.EAA03734@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <Pine.SV4.3.95.960808183228.608E-100000@itsrm1> from Andrej Borsenkow at "Aug 8, 96 07:13:48 pm"
Andrej Borsenkow wrote:
[...]
> 1. It doesn't like malformed constructs like
>
> A="`cat /some/file" (note missed backtick)
>
> zsh tries to parse command substitution behind closing double-quote, and
> ends up with `missing "' at the end of script. Our /bin/sh stops at
> closing double-quote. In POSIX the result is undefined - thus, techically
> neither violate it.
I copied the behaviour of bash here. pdksh also behaves this way.
> But the following things could probably be fixed
>
> 4. Traditional /bin/sh interprets `set -' as set +xv. It could be well
> undocumented (it is not on our system) but still is so. Could anybody test
> it on more than one systems? zsh silently sets positional parameters to
> null. At least on our system many startup scripts include
>
> set -$DEBUG
>
> at the script start (intent is to set DEBUG=x somewhere in /etc/rc2 to see
> what's going on). Under zsh, script just loses its arguments and ends up
> with error (it is SVR4 startup scripts are called with
> /bin/sh /etc/rc2.d/S*something start
> if `start' is not there, script just exits).
OK. I've changed that. set - will be the same as set +xv and
set - args will be the same as set +xv -- args. This will not be
documented since it is just an obsolecent compatibility feature and
noone should use that.
> 5. Currently zsh sets BSD_ECHO when running as sh. Our sh does support
> escapes in echo; I recall that SCO sh does it as well. I don't know about
> others. What about relaxing it? If scripts doesn't rely upon escapes in
> echo, it would make no harm.
I'll try to write a configure check for the echo style of /bin/sh and use
that.
Zoltan
next prev parent reply other threads:[~1996-08-12 2:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-31 21:11 Announcement draft Zoltan Hidvegi
1996-07-31 22:15 ` Zefram
1996-08-01 6:36 ` Bas V. de Bakker
1996-08-01 8:31 ` Peter Stephenson
1996-08-01 9:04 ` Running zsh as sh (Was: Announcement draft) Bas V. de Bakker
1996-08-01 9:10 ` Announcement draft Andrej Borsenkow
1996-08-01 13:49 ` Here docs Peter Stephenson
1996-08-01 14:07 ` Zoltan Hidvegi
1996-08-01 16:27 ` More Configure problems Peter Stephenson
1996-08-01 17:40 ` Peter Stephenson
1996-08-01 17:55 ` Zoltan Hidvegi
1996-08-01 21:03 ` Zoltan Hidvegi
1996-08-01 23:30 ` Zoltan Hidvegi
1996-08-02 8:32 ` Peter Stephenson
1996-08-02 10:03 ` Andrej Borsenkow
1996-08-02 13:29 ` Zoltan Hidvegi
1996-08-02 1:03 ` Zefram
1996-08-01 14:42 ` Announcement draft Zoltan Hidvegi
1996-08-08 15:13 ` sh compatibility again :-> Andrej Borsenkow
1996-08-12 2:18 ` Zoltan Hidvegi [this message]
1996-08-12 4:36 ` Bart Schaefer
1996-08-12 5:00 ` Zefram
1996-08-12 6:01 ` Bart Schaefer
1996-08-12 6:34 ` Bart Schaefer
1996-08-12 6:20 ` Andrej Borsenkow
1996-08-12 15:29 whukriede
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=199608120218.EAA03734@hzoli.ppp.cs.elte.hu \
--to=hzoli@cs.elte.hu \
--cc=borsenkow.msk@sni.de \
--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).