From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6729 invoked by alias); 14 Aug 2017 07:19:20 -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: 41543 Received: (qmail 4188 invoked by uid 1010); 14 Aug 2017 07:19:20 -0000 X-Qmail-Scanner-Diagnostics: from mx1.redhat.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.132.183.28):SA:0(-6.9/5.0):. Processed in 1.975 secs); 14 Aug 2017 07:19:20 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: kdudka@redhat.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7BDD640812 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kdudka@redhat.com From: Kamil Dudka To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: [BUG] 'exec' runs shell functions and builtins Date: Mon, 14 Aug 2017 09:19:20 +0200 Message-ID: <14882977.bakpPfWbpK@kdudka-nb> User-Agent: KMail/4.14.10 (Linux/4.9.34-gentoo; KDE/4.14.32; x86_64; ; ) In-Reply-To: <20170811162501.67a00cda@pwslap01u.europe.root.pri> References: <10971700.ghLbJLaWGu@kdudka-nb> <20170811162501.67a00cda@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 14 Aug 2017 07:19:12 +0000 (UTC) On Friday, August 11, 2017 16:25:01 Peter Stephenson wrote: > On Fri, 11 Aug 2017 17:10:12 +0200 > > Kamil Dudka wrote: > > It is good that zsh does not need this in its native configuration but > > how is it supposed to work in the POSIX emulation mode now? > > > > % (exec cd) > > % emulate sh > > % (exec cd) > > zsh: command not found: cd > > > > If I understand http://www.zsh.org/mla/workers/2017/msg01138.html > > correctly, then the above command should work? > > I can't actually think of a useful application of the above that would > make "work" meaningful. What's the "exec" supposed to be doing? Who > would even try to exec a builtin, even if they discover that for some > bizarre reason the standard says you can? The one possible use of > "exec" in that case might be to ensure you're *not* using a builtin --- > but apparently you are? What? > > pws Thanks for the reply! It did not make much sense to me either but I am by no means expert in this area. In fact I hoped to hear some explanation on this list because the topic had been raised here recently. Given the lack of information about the reasoning behind the strange POSIX requirement, I agree to keep the behavior of zsh as it is now. Kamil