Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
LINENO behaviour in sh mode
- X-seq: zsh-workers 40880
- From: Martijn Dekker <martijn@xxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: LINENO behaviour in sh mode
- Date: Mon, 20 Mar 2017 03:57:01 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Test script:
printf "$LINENO "
printf "$LINENO "
eval ' printf "$LINENO "
printf "$LINENO "
printf "$LINENO " '
printf "$LINENO\n"
Output on various shells:
bash: 1 2 5 6 7 6 (?!)
{m,l,pd}ksh: 1 2 0 0 0 6 (?)
AT&T ksh88: 1 2 3 3 3 6
AT&T ksh93: 1 2 1 2 3 6
FreeBSD sh: 1 2 1 2 3 6
dash: 1 2 1 2 3 6
yash: 1 2 1 2 3 6
zsh (native): 1 2 1 2 3 6
zsh (sh): 1 2 3 3 3 6 (like ksh88)
Since ksh88 is dead and buried (even Solaris now has ksh93 as their
/bin/sh), it looks like zsh's "sh" mode is not emulating any current sh.
Maybe 'emulate sh' should no longer turn off the EVAL_LINENO option.
- M.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author