Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.1.1-test-1



On Sat, 21 Nov 2015 20:09:08 +0100
Simon Ruderich <simon@xxxxxxxxxxxx> 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;
 }



Messages sorted by: Reverse Date, Date, Thread, Author