From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27250 invoked by alias); 23 Mar 2017 00:49:54 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40880 Received: (qmail 7109 invoked from network); 23 Mar 2017 00:49:54 -0000 X-Qmail-Scanner-Diagnostics: from kahlil.inlv.org by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(37.59.109.123):SA:0(-0.0/5.0):. Processed in 0.705339 secs); 23 Mar 2017 00:49:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: martijn@inlv.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at inlv.org does not designate permitted sender hosts) To: Zsh hackers list From: Martijn Dekker Subject: LINENO behaviour in sh mode Message-ID: Date: Mon, 20 Mar 2017 03:57:01 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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.