From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10646 invoked by alias); 20 Sep 2017 17:16:01 -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: 41736 Received: (qmail 4617 invoked by uid 1010); 20 Sep 2017 17:16:01 -0000 X-Qmail-Scanner-Diagnostics: from mail-pg0-f53.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.83.53):SA:0(-1.9/5.0):. Processed in 3.831071 secs); 20 Sep 2017 17:16:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=ZvcAGMseJyMVub94ZsMQVwECA7LL/pWYhC/NNogSL6w=; b=bHk4sAmOHFJ8hcIOYJ1aIOiR/7hwDVeM7u4F1yTS2zfhxSWKt/jDs2C+xQ52IcOIp6 bYfe+yWeUts18aL2Y9VFSN6GhrPiUYzHCO1U/3I9ohirJcOZg4HNt7Y6HnqXArKhKAJL ymijBXsGmoWcQGu04K6Szjs+BWJ5DEFGp3BG25gxwlIfbmVn50FCZvKxYTwzrAH5Qf2m xIGys+ispqz4KxXvx6buKLIGAKU1/5aM0BzX+Gr/2yxgKFwMPMo5ZdEWBWm8xGJlAzyK S5N+fz+PVoimvGQp+AI83jEtDRNnKwDGjIcgLyUVChOgNBcM+UKnl+qSQPmBgZau+ZEx 9UiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=ZvcAGMseJyMVub94ZsMQVwECA7LL/pWYhC/NNogSL6w=; b=paHU6azEdid1/vNWBY8eaP/sW+LcSe2pB5ISDJgjX6L1Lvjvj8duLYx0h3MGzHbKc8 JHdkXtQaaOzyHO0nogqFyHQigISPRR0jFf6YS1bNdvioF+qES/WQwE3wg29UCN1gklJK UiCL0vwyPFNVf/DcuvQdisU/89/wknPhP9i4lCQP8Gw2E6tBjkJIFu7ayTCOzXeU8JM3 lXJStbeBpUatqf56adH4Qb/MusnxmzbbCPLZXk4QlTrtKNFKHoSAx5MsuzxlMlFrCmRa 22CAayFpEbaTnuWUCyxSl1XHMN5r23Pe07h7MFKsRaMmV44IPGDcaVklvn/KqrgMAQnU 1XJQ== X-Gm-Message-State: AHPjjUjQd1Hx/3pFwXCdUeFJD0jwb5A8iihz2XoD0LLMWBbVL6t/GZPE rtneBryFiG6iSitbQc9iLpgGglS7 X-Google-Smtp-Source: AOwi7QBksTEnrMu3a7gwQYr9bVEf+WASHul7lwlzg7+V1g4af1wqT5/MPOYbo18B3ikhGo7IHmTTtQ== X-Received: by 10.84.253.151 with SMTP id a23mr2815707plm.144.1505927752177; Wed, 20 Sep 2017 10:15:52 -0700 (PDT) From: Bart Schaefer Message-Id: <170920101605.ZM15552@torch.brasslantern.com> Date: Wed, 20 Sep 2017 10:16:05 -0700 In-Reply-To: <20170920115418.GB21515@archlinux> Comments: In reply to Stanislav Seletskiy "Re: Comment (# char) behavior in the sub-shell" (Sep 20, 6:54pm) References: <20170910210636.17bc0581@ntlworld.com> <170910152711.ZM4470@torch.brasslantern.com> <20170911094926.5d8dc355@pwslap01u.europe.root.pri> <20170911104239.44911443@pwslap01u.europe.root.pri> <20170920115418.GB21515@archlinux> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Comment (# char) behavior in the sub-shell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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))) {