From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29260 invoked by alias); 26 May 2011 20:32:12 -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: 29381 Received: (qmail 1841 invoked from network); 26 May 2011 20:32:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Bernhard Tittelbach Subject: Re: PATCH: _initctl: only define helper functions once Date: Thu, 26 May 2011 22:31:54 +0200 Message-ID: References: <20110526103606.0d7cd39a@pwslap01u.europe.root.pri> <1306425923-6895-1-git-send-email-mikachu@gmail.com> <20110526171112.2a51be51@pwslap01u.europe.root.pri> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: chello080109208103.3.graz.surfer.at User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.23) Gecko/20091001 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: On 2011-05-26 21:42, Mikael Magnusson wrote: > On 26 May 2011 21:37, Bernhard Tittelbach wrote: >> nice trick ! >> >> :-) > > Now that I look at it again, could that typeset -g be outside the > _initctl() function without the if, so it's just run once (when the > whole file is autoloaded)? > yes, that definitely works :-) new & complete file here: http://paste.grml.org/432/