From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23544 invoked by alias); 10 Aug 2015 15:24:38 -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: 36072 Received: (qmail 27696 invoked from network); 10 Aug 2015 15:24:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.0 From: Frank Terbeck To: zsh-workers@zsh.org Subject: wrapping "local" (was: Re: [PATCH 10/18] Add helper script to check state of _tmux completion) In-Reply-To: <1439213258-14196-11-git-send-email-ft@bewatermyfriend.org> (Frank Terbeck's message of "Mon, 10 Aug 2015 15:27:30 +0200") References: <1439213258-14196-1-git-send-email-ft@bewatermyfriend.org> <1439213258-14196-11-git-send-email-ft@bewatermyfriend.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Date: Mon, 10 Aug 2015 17:20:59 +0200 Message-ID: <8737zrrwys.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 Hi! Could it be, that I can't write a wrapper around "local" anymore? In this script: Frank Terbeck wrote: [...] > +function _arguments () { } > +function _describe () { } > +function local () { } > + > +typeset -A rev > + > +source $func > +__tmux-server-options > +__tmux-session-options > +__tmux-window-options ...I am using a trick: The __tmux-*-options() functions define variables "$tmux_session_options" for example in local scope. I was injecting a function called "local" so that the functions wouldn't put their variables into local scope anymore. That way I could inspect these variables later on in the script. After pushing these changes, I also updated zsh on my system. Turns out that with an updated zsh binary, the trick doesn't work anymore and I end up with nothing. Was this intended? Is it a bug? If not, is there a way to make the trick work? Regards, Frank