From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20333 invoked by alias); 13 May 2014 16:42:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18793 Received: (qmail 26034 invoked from network); 13 May 2014 16:42:08 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Tue, 13 May 2014 18:42:06 +0200 From: Roman Neuhauser To: Peter Stephenson Cc: zsh-users@zsh.org Subject: Re: r/w access to calling function's $@ Message-ID: <20140513164206.GD1629@isis.sigpipe.cz> References: <20140513160140.GC1629@isis.sigpipe.cz> <20140513171321.03294b76@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140513171321.03294b76@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2010-09-15) # p.stephenson@samsung.com / 2014-05-13 17:13:21 +0100: > On Tue, 13 May 2014 18:01:40 +0200 > Roman Neuhauser wrote: > > zparseopts can modify $@ in the calling scope. i'm playing with my own, > > slightly different option parser. what do i have to do to get access to > > this feature? > > The trick is it's not a different scope, it's just a builtin within the > current function scope. The equivalent would be to implement your own C > plugin, which I presume is not what you're after. yeah, i was hoping there was a way to implement "builtins" in zsh (as opposed to C). > Failing that you have to do something nasty like using "eval" to avoid > exposing the point where it gets transferred to the current argument > set. not sure what exactly you have on mind here, could you give me a sketch? > (While I've been distracting you, Bart will meanwhile have thought > of a way of doing it.) That reminds me: thanks for the many years of work on zsh, and great support you two provide seemingly tirelessly. -- roman