From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6833 invoked by alias); 23 Mar 2017 02:44:42 -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: 40881 Received: (qmail 617 invoked from network); 23 Mar 2017 02:44:42 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f43.google.com 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(209.85.213.43):SA:0(-2.3/5.0):. Processed in 1.174407 secs); 23 Mar 2017 02:44:42 -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=-2.3 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_SORBS_SPAM,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=F2kIXDUbsnOJOvWm/vdmV+WSLYvUGbBO/2ev6o3dr9g=; b=k7PeizoPskY1nPtRZTUob2mIHeCFIcHrYfseJR9n5ecs+Nz3HcP47Dz+dBH00fnkNX brBH6yWrJ5lCQniz8N7Nkkx9ducpqij3PjxJriUxggV0OaDhN/VxrLByS0bMyekAPdM6 sROtkI+Al+dOi0rdbiuIGOkFgARxDs1wmZKCHBPIqjMBDhvtguOknrjYI8BkqvfQsXpN p6ijIZjQ8wewQMg38IG4Z49dlpiDvCavrHOYevIcP+7N54tkygkAjZd5O5t9P6BWQPTn Kx7G41ujiUg//z+ggWsQeGjCv1R5cFsptvk9iRXuAlPgcihwJhMhDPkjuRb2xRUCgd4R PeMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=F2kIXDUbsnOJOvWm/vdmV+WSLYvUGbBO/2ev6o3dr9g=; b=eeZjOgBxtFkUIi2xzdvgMZbtWFmb0niHETNnwtP9De+UlQProb3swIwo1tESlZm6ai Rchm3xPuSDrX+xQDxfKw3DchqCIsh9kWKl2X9au5isuJcy4kyQzdmz1sWkzWaxHc6YIY 1BpCN9x+6iqS5aPCpKgnpWFunD2tILKoUzZNACRRAj7pt3LDjZPKo+RuQKgy62RcdthU XdgCkLkZf2yIFEGCMT2KPY1WzeOA/ss3/eQ1lF6KTBcXQ7EGanYnS4MlfRGWfnJirnK0 +4jY609vGcirMqp24wwVwKA0uD+ryGIu2K0PNVkCNADX9K9JzBpps1gCQCP9hxoWVX1U ruNw== X-Gm-Message-State: AFeK/H1pqlC1sQOXouovHbE8pRWak9nNF7MOuaWvJUSt9RwxtBw1KIDK2HgJOCqmZTF43g== X-Received: by 10.31.8.80 with SMTP id 77mr56329vki.137.1490237072534; Wed, 22 Mar 2017 19:44:32 -0700 (PDT) From: Bart Schaefer Message-Id: <170322194527.ZM5658@torch.brasslantern.com> Date: Wed, 22 Mar 2017 19:45:27 -0700 In-Reply-To: Comments: In reply to Martijn Dekker "LINENO behaviour in sh mode" (Mar 20, 3:57am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Martijn Dekker , Zsh hackers list Subject: Re: LINENO behaviour in sh mode MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 20, 3:57am, Martijn Dekker wrote: } } Output on various shells: } bash: 1 2 5 6 7 6 (?!) Clearly bash is incrementing LINENO through the parse of the eval and then continuing to increment it through the execution. I'm mildly surprised that no shell prints "1 2 3 4 5 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. You're forgetting about the second effect of this, which is to print "(eval)" in xtrace output instead of the script or function name. Try your test again with "set -x" ... Do we need a separate option? Also, how should the doc be updated, given that csh emulation would become the outlier?