about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-12-31 12:44:25 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2015-12-31 12:44:25 -0800
commit6e10224f1ec4cb61df4982661bfb524cbafbd03b (patch)
tree191f37ff2190cc3a13fb7679441147c0035b578f
parent0504dafa6e20491565ee774c33a5f7bca5dd62fa (diff)
downloadzsh-6e10224f1ec4cb61df4982661bfb524cbafbd03b.tar.gz
zsh-6e10224f1ec4cb61df4982661bfb524cbafbd03b.tar.xz
zsh-6e10224f1ec4cb61df4982661bfb524cbafbd03b.zip
unposted: enable WARN_CREATE_GLOBAL for print -v
-rw-r--r--ChangeLog2
-rw-r--r--Src/builtin.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 78555b5e1..3d52ac0be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-12-31  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* unposted:  Src/builtin.c: enable WARN_CREATE_GLOBAL for print -v
+
 	* 37468: Src/parse.c: allow line breaks in more places in [[ ... ]]
 
 	* 37467: Doc/Zsh/builtins.yo, Src/builtin.c, Test/B03print.ztst:
diff --git a/Src/builtin.c b/Src/builtin.c
index 128bc36b5..05907f1d3 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -4376,7 +4376,7 @@ bin_print(char *name, char **args, Options ops, int func)
 	/* -v option -- store the arguments in the named parameter */
 	if (OPT_ISSET(ops,'v')) {
 	    queue_signals();
-	    assignsparam(OPT_ARG(ops, 'v'), sepjoin(args, NULL, 0), 0);
+	    setsparam(OPT_ARG(ops, 'v'), sepjoin(args, NULL, 0));
 	    unqueue_signals();
 	    return 0;
 	}
@@ -4882,7 +4882,7 @@ bin_print(char *name, char **args, Options ops, int func)
 	if (OPT_ISSET(ops,'z')) {
 	    zpushnode(bufstack, stringval);
 	} else if (OPT_ISSET(ops,'v')) {
-	    assignsparam(OPT_ARG(ops, 'v'), stringval, 0);
+	    setsparam(OPT_ARG(ops, 'v'), stringval);
 	} else {
 	    ent = prepnexthistent();
 	    ent->node.nam = stringval;