From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16389 invoked by alias); 3 Jun 2014 21:21:19 -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: 32686 Received: (qmail 1569 invoked from network); 3 Jun 2014 21:21:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=rw6XSeAXgWZBmSZ2wXOn8UrXSqrXiQvIUGsAabzqIc8=; b=FanjypAr8iP7ThrFpBrO1aJ8P1XN07oaq1z5d4/2gRA3UGRWqQf/84YF0DhrB3shsV AFT+wHss3aTNa+sTBIByAjDyuToIydr5BFRUhonIe/rf+MWVeKD6GH/CAWXqXAG3VRGZ 2v43WHIEeEu4gbleOyDlBZEQjX2odYB5Yt/Zb5aZl+IeWTwEk0HnZUQ3dmUAtw17UAIH O9IZFtLdAp0G8lLaMKPM/3lcC8Na1W3vpW1adcv2CVUqFq8dRaq6xd09hLD9O3MzWoiQ SLZHmftSP7NaeOR/IiI7W9WMc9AaWO/aE1xhDGgCyDs/huHpHYg0fSR9YNj40VSevo54 TtQg== X-Gm-Message-State: ALoCoQmfDdupuLtz5DXw/bwzh4NvolO0Mwhvb99hEY1xrISnxIT2aHdr4kX6AdCX+dDZLZKQyjBs MIME-Version: 1.0 X-Received: by 10.229.213.66 with SMTP id gv2mr64100505qcb.13.1401830462734; Tue, 03 Jun 2014 14:21:02 -0700 (PDT) In-Reply-To: <538E2CDD.7070106@bbn.com> References: <5387BD0D.8090202@bbn.com> <140529204533.ZM5362@torch.brasslantern.com> <5388461D.8060203@bbn.com> <140530100050.ZM18382@torch.brasslantern.com> <5388F4C3.6070801@bbn.com> <140530221301.ZM31798@torch.brasslantern.com> <538E2CDD.7070106@bbn.com> Date: Tue, 3 Jun 2014 14:21:01 -0700 Message-ID: Subject: Re: 'emulate sh -c' and $0 From: Bart Schaefer To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=001a11333facd0a65704faf51670 --001a11333facd0a65704faf51670 Content-Type: text/plain; charset=UTF-8 On Jun 3, 2014 1:15 PM, "Richard Hansen" wrote: > > Wow, thank you for committing this change to master! It works well in > my limited testing, except for the documented limitation that > POSIX_ARGZERO stays enabled when calling a non-emulated function from a > function defined in 'emulate -c'. I'm not sure how much this > will matter in practice, but if backward compatibility wasn't a concern > it'd be nice if zsh temporarily restored options when invoking a > function outside the 'emulate -c' boundary. What this is effectively requesting is that all functions have "sticky" options, always. We already rejected that idea for reasons of dynamic scoping when originally designing "emulate ... -c". I suppose a special case could be made of POSIX_ARGZERO such that it is always sticky even when other options are not, but that seems like an awful lot of effort for something that doesn't matter most of the time. --001a11333facd0a65704faf51670--