From: "Matthias B." <msbREMOVE-THIS@winterdrache.de>
To: zsh-workers@sunsite.dk
Subject: zsh/bash incompatibilities
Date: Mon, 25 Oct 2004 15:06:30 +0200 [thread overview]
Message-ID: <20041025150630.230c5115@buddha.localdomain.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 700 bytes --]
I've encountered several things where zsh's behaviour (in sh-mode) differs
from that of bash (in sh-mode).
The attached script demonstrates the differences. When /bin/sh is bash,
the output is
ab
\y
$
When /bin/sh is zsh, the output is
a
b
y
\44
I'm undecided about which \ treatment inside of $'..' I prefer, so I guess
looking to what POSIX says is best. Regarding zsh's refusal to interpret
octal escapes that don't start with 0, I find that very annoying and it's
certainly not what most people expect. There are scripts out there that
will fail with sh=zsh because of this. I think this should be changed
(regardless of what POSIX says).
MSB
--
Indecision is the key to flexibility.
[-- Attachment #2: bash_zsh_differences --]
[-- Type: text/plain, Size: 50 bytes --]
#!/bin/sh
echo $'a\
b'
echo $'\y'
echo -e '\44'
next reply other threads:[~2004-10-25 13:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-25 13:06 Matthias B. [this message]
2004-10-25 13:20 ` DervishD
2004-10-25 13:23 ` Peter Stephenson
2004-10-25 15:14 ` Peter Stephenson
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=20041025150630.230c5115@buddha.localdomain.de \
--to=msbremove-this@winterdrache.de \
--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).