zsh-workers
 help / color / mirror / code / Atom feed
* zsh/bash incompatibilities
@ 2004-10-25 13:06 Matthias B.
  2004-10-25 13:20 ` DervishD
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthias B. @ 2004-10-25 13:06 UTC (permalink / raw)
  To: zsh-workers

[-- 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'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-25 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-25 13:06 zsh/bash incompatibilities Matthias B.
2004-10-25 13:20 ` DervishD
2004-10-25 13:23 ` Peter Stephenson
2004-10-25 15:14 ` Peter Stephenson

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).