Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sh compatibility again :->
- X-seq: zsh-workers 1942
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: sh compatibility again :->
- Date: Mon, 12 Aug 1996 06:00:56 +0100 (BST)
- Cc: hzoli@xxxxxxxxxx, borsenkow.msk@xxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <960811213634.ZM4881@xxxxxxxxxxxxxxxxxxxxxxx> from "Bart Schaefer" at Aug 11, 96 09:36:34 pm
>Right; if I recall correctly, bash and ksh both permit stuff like:
>
>$ echo "foo `echo "bar baz"` boing"
>
>That is, bash and ksh nest double quotes inside backticks. Old-fashioned
>Bourne shell, on the other hand, does NOT permit nesting of double quotes,
>even inside backticks.
...
>The only way to resolve this would be with yet another option, SH_QUOTES
>or some such. Worth it? Dunno.
Not worth it. POSIX leaves the behaviour undefined IIRC, and there's
no advantage in the traditional behaviour.
>} I'll try to write a configure check for the echo style of /bin/sh and use
>} that.
>
>Eww, no. Let's pick one behavior and stick with it, please. The default
>options, even in an emulation mode, shouldn't vary from one installation
>to the next! It's been a long time since I encountered an sh that didn't
>have a builtin SysV-style echo -- BSD_ECHO is needed mostly for csh
>compatibility. I'd vote for leaving BSD_ECHO off when run as "sh".
I also recommend against a configure check, but for a different reason:
some widespread shs (notably SunOS and Solaris) vary their echo
behaviour depending on $PATH, trying to emulate what would happen if
echo weren't a builtin. It's really quite difficult to reliably detect
this behaviour. I suggest that the behaviour should remain as it is.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author