From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8915 invoked by alias); 22 Nov 2015 15:31:14 -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: 37186 Received: (qmail 69 invoked from network); 22 Nov 2015 15:31:12 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Originating-IP: [86.6.158.222] X-Spam: 0 X-Authority: v=2.1 cv=RLtOZNW+ c=1 sm=1 tr=0 a=2SBOh4l1h08DI0L+aujZyQ==:117 a=2SBOh4l1h08DI0L+aujZyQ==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=6EjVDL0tAAAA:8 a=84PDoHUSR1iLzdAl7REA:9 a=CjuIK1q_8ugA:10 Date: Sun, 22 Nov 2015 15:31:08 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: zsh 5.1.1-test-1 Message-ID: <20151122153108.6054abfc@ntlworld.com> In-Reply-To: <20151121190908.GA1249@ruderich.org> References: <20151121183514.527eccf6@ntlworld.com> <20151121190908.GA1249@ruderich.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 21 Nov 2015 20:09:08 +0100 Simon Ruderich wrote: > However on startup with my zshrc I get the following error from > VCS_info: > > VCS_INFO_maxexports:7: array parameter zle_bracketed_paste created globally in function VCS_INFO_maxexports That's an exception --- the variable so created is intended to be global, so needs to be treated specially. > VCS_INFO_nvcsformats:13: array parameter msgs created globally in function VCS_INFO_nvcsformats That's not --- msgs needs to be local within the function, so this is the warning doing its job properly. Thanks for these --- I'm sure there are more when people get around to running their favourite distributed functions with the latest coe. > Btw. it would be really nice if we could get signed releases > (signed git tag and signature files for the tarballs). Having to > download untrusted code and just running it is something I'd like > to avoid. Especially useful for distributions which provide those > sources to many users. This has been mentioned before and I'm happy to go along with it if someone who knows what they're doing wants to set it up / establish ground rules. I'll need to set up a gpg key as it doesn't like my existing PGP key. (The idea that a tag signed by me is somehow "safer" than anything else on the master branch in the git repository is a bit far-fetched, but that's a different issue; nothing wrong with using the state of the art technology.) pws diff --git a/Functions/VCS_Info/VCS_INFO_nvcsformats b/Functions/VCS_Info/VCS_INFO_nvcsformats index 581aa5a..203a86d 100644 --- a/Functions/VCS_Info/VCS_INFO_nvcsformats +++ b/Functions/VCS_Info/VCS_INFO_nvcsformats @@ -4,6 +4,7 @@ setopt localoptions noksharrays NO_shwordsplit local c v rr +local -a msgs if [[ $1 == '-preinit-' ]] ; then c='default' diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 593d636..38427e8 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -2045,7 +2045,8 @@ setup_(UNUSED(Module m)) bpaste = zshcalloc(3*sizeof(char *)); bpaste[0] = ztrdup("\033[?2004h"); bpaste[1] = ztrdup("\033[?2004l"); - setaparam("zle_bracketed_paste", bpaste); + /* Intended to be global, no WARNCREATEGLOBAL check. */ + assignaparam("zle_bracketed_paste", bpaste, 0); return 0; }