From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21932 invoked by alias); 21 Feb 2010 17:25:25 -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: 27736 Received: (qmail 23565 invoked from network); 21 Feb 2010 17:25:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <100221092514.ZM24056@torch.brasslantern.com> Date: Sun, 21 Feb 2010 09:25:14 -0800 In-reply-to: <1266764004-15068-1-git-send-email-ft@bewatermyfriend.org> Comments: In reply to Frank Terbeck "PATCH: vcs_info: Set NO_warn_create_global option" (Feb 21, 3:53pm) References: <1266764004-15068-1-git-send-email-ft@bewatermyfriend.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: vcs_info: Set NO_warn_create_global option MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 21, 3:53pm, Frank Terbeck wrote: } } zstyle -e ':vcs_info:git:*' \ } check-for-changes 'estyle-cfc && reply=( true ) || reply=( false )' } } That however, welcomes me with this nice warning: } VCS_INFO_get_data_git:49: array parameter reply created globally in function } So, there are three options: } a) Get the big hammer and just disable `warn_create_global' in } vcs_info. } b) Use a smaller hammer, and create a wrapper function around zstyle } for vcs_info, that disables the option locally. } c) Disable `warn_create_global' in code executed by "zstyle -e". Or } make `reply' and `REPLY' special in that case. Or whatever makes the } most sense. There's another option b.5) Write the style like this: zstyle -e ':vcs_info:git:*' \ check-for-changes 'typeset -g reply; \ estyle-cfc && reply=( true ) || reply=( false )' Also, rather than (c) I might suggest d) Suppress warn_create_global for the parameters "reply" and "REPLY" at all times. In fact it probably ought to be suppressed for STTY and a few others in the "Parameters Used By The Shell" section of the manual.