From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Comment (# char) behavior in the sub-shell
Date: Wed, 20 Sep 2017 10:16:05 -0700 [thread overview]
Message-ID: <170920101605.ZM15552@torch.brasslantern.com> (raw)
In-Reply-To: <20170920115418.GB21515@archlinux>
On Sep 20, 6:54pm, Stanislav Seletskiy wrote:
}
} I'm using your patch and it works great.
}
} Is there chance it will be merged into upstream? I really miss that
} functionality.
Here's an updated patch with a NEWS file entry.
diff --git a/NEWS b/NEWS
index 6847350..796a2c9 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 d136766..31edfab 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))) {
next prev parent reply other threads:[~2017-09-20 17:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-09 16:33 Stanislav Seletskiy
2017-09-09 22:46 ` Bart Schaefer
2017-09-10 20:06 ` Peter Stephenson
2017-09-10 21:24 ` Stanislav Seletskiy
2017-09-10 22:27 ` Bart Schaefer
2017-09-11 8:49 ` Peter Stephenson
2017-09-11 9:42 ` Peter Stephenson
2017-09-20 11:54 ` Stanislav Seletskiy
2017-09-20 17:16 ` Bart Schaefer [this message]
2017-09-21 4:43 ` Stanislav Seletskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170920101605.ZM15552@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).