summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2017-09-20 10:17:59 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2017-09-20 10:17:59 -0700
commitd1914c5af484791ee5d8f20261c08cecf113d3a9 (patch)
treeadc839d6129c576079d2f5bf9207bdeb8f2ff095
parent2c41dc0b2ed463faffa5508885f65ac396564dc7 (diff)
downloadzsh-d1914c5af484791ee5d8f20261c08cecf113d3a9.tar.gz
zsh-d1914c5af484791ee5d8f20261c08cecf113d3a9.zip
41736: NO_INTERACTIVE_COMMENTS in $(...)
-rw-r--r--ChangeLog2
-rw-r--r--NEWS8
-rw-r--r--Src/exec.c7
3 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 302177f9b..34163e55f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2017-09-20 Barton E. Schaefer <schaefer@zsh.org>
+ * 41736: NEWS, Src/exec.c: NO_INTERACTIVE_COMMENTS in $(...)
+
* 41731: Doc/Zsh/params.yo: reformat and expand doc for 41698.
2017-09-18 Oliver Kiddle <opk@zsh.org>
diff --git a/NEWS b/NEWS
index 6847350ef..796a2c90d 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,14 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH
Note also the list of incompatibilities in the README file.
+Changes from 5.4 to 5.4.3
+-------------------------
+
+The effect of the NO_INTERACTIVE_COMMENTS option extends into $(...) and
+`...` command substitutions when used on the command line. Previously,
+comments were always recognized within command substitutions unless the
+comment character "#" was disabled via reset of $histchars.
+
Changes from 5.3.1 to 5.4
-------------------------
diff --git a/Src/exec.c b/Src/exec.c
index d1367660c..31edfab55 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4509,7 +4509,12 @@ getoutput(char *cmd, int qt)
pid_t pid;
char *s;
- if (!(prog = parse_string(cmd, 0)))
+ int onc = nocomments;
+ nocomments = (interact && unset(INTERACTIVECOMMENTS));
+ prog = parse_string(cmd, 0);
+ nocomments = onc;
+
+ if (!prog)
return NULL;
if ((s = simple_redir_name(prog, REDIR_READ))) {