Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Announcement draft

bas@xxxxxxxxxxxx wrote:
> > /bin/sh can be safely linked to zsh.
> This sounded too good to be true, so I just tested this on the perl
> Configure script and it failed, sorry.  (To be slightly more precise:
> when typing '& -d' at a prompt to make it use the defaults zsh gives
> me a parse error, while /bin/sh (POSIX, not traditional Bourne) has no
> problems.  This on HPUX 10.10.)

Irix, too.  I think I've pinpointed this: it happens when the `myread'
file for later sourcing is set up as a here document.

% <testscr
cat <<EOSC >test.out
eval "ans=\"\$answ\""
% zsh -fc 'emulate sh; . ./testscr' 
% <test.out
eval "ans="$answ""
% sh -c '. ./testscr'
% <test.out
eval "ans=\"$answ\""

Zsh is stripping the backslash from the double quotes.  This looks
wrong to me.  `answ' contains the user input, here "& -d", which is
causing the problem.  (I didn't look into the specific nature of the
problem, but the errors is reported on that line, which is the only
one which is significantly different from the sh version of myread.)

Anyone know the proper backslash rules for here documents?

By the way: some time after 3.0 is released and stable (preferably not
in that order :-/) it would be quite nice to have ksh/sh emulation as
a command line option, to avoid what I had to do above (linking zsh
under sh, when there's a real sh on the machine, is no nicer).

Peter Stephenson <pws@xxxxxx>       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.

Messages sorted by: Reverse Date, Date, Thread, Author