From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9770 invoked by alias); 9 Sep 2017 16:34:18 -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: 41656 Received: (qmail 21650 invoked by uid 1010); 9 Sep 2017 16:34:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-pg0-f52.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.52):SA:0(-1.9/5.0):. Processed in 1.181193 secs); 09 Sep 2017 16:34:18 -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,FREEMAIL_FROM, 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: s.seletskiy@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=mFQGrdn3uysLmvf5Pys2yKagMWsrg0ZGtWGrBKM67Bo=; b=FjOC14zmFSFVzWp4ijczUuEeyOnemMWx/Wr29u/p92S6oVZ5ciRiUMzH/JJdnoBs50 bcqnlr34yQqYcp1nAwg9yUv0snLHs2aMG1E0wfcNd6NGHsljYrM/3ezbdA3sqyMQGgLp q2oLmY+pyBD/wqi2boAGlscKjwagPlsV+yjaZTytNR5+p4Qzm/oniFQRjCZJImGovCn9 Ae5hvLFHsCHlx9DCcZQkbEzfD2a3eRKGhu6k/5GVgJmW+MBFnXMxk8dfbK/uBvfM4Mpu D30g9dn0b5nnBdqroWtsbCKX4qLtSX7va3gu+dXWcpACePQxWwdhWfOQsRTbgnrJfDB0 YPUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=mFQGrdn3uysLmvf5Pys2yKagMWsrg0ZGtWGrBKM67Bo=; b=b9kwoR8gz5ztHXeGiRdNvwFWzB4Tpv6J1AFk+0Ev/piChVXJ5FAZTfz6MR6uIm64JZ IJIne6Vu+VYsDqCvDVEJnG+kslES9AipM47ZKo4TqFD/0CeIIvl1ZWD8Nk+IvHXVMFY5 jym7o3e3BOjf0X8CqrDTIjACtUNthuGu2lWbsUxp3gRe4KN0+A4pVqkqx9wRuWAKSKuO oNmkIaGX4HopJFP0Fe6rf733+D7vATaHR91n2qNpL5ETjmgV5XXeSrCMXevnArRMrmbq F9BZVQ9YAdpqotZBnDLOmq5InthKuuc40aDTsq4vzryaZ7bM2IyivGf7nvyKvi0t+xbS P4Lw== X-Gm-Message-State: AHPjjUg80CldK0dNKtRS24C0K7UXQPhHCm5jPaFTfle0bKYlCIg5heSI ofSt3yWis7zgbkULVqCEyk1B1owHug== X-Google-Smtp-Source: ADKCNb7tPFLPLPGu4qgP2cY3uiijCvK0KvNdZ/k99fKcHvjadZoKwPiTyjJeNiTCH2xkFGl/u6Pk33PB3nsI5oa+kQ0= X-Received: by 10.99.123.16 with SMTP id w16mr6686545pgc.396.1504974854725; Sat, 09 Sep 2017 09:34:14 -0700 (PDT) MIME-Version: 1.0 From: Stanislav Seletskiy Date: Sat, 9 Sep 2017 19:33:59 +0300 Message-ID: Subject: Comment (# char) behavior in the sub-shell To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zsh version: 5.4.2 I'm heavy user of `#`-aliases, so I like to do stuff like `seq 1 10 # 9` to grep for `9` (`alias -g -- '#'=3D'| grep'`). It works as expected when I'm entering command in interactive mode without sub-shell, like: `$ seq 1 10 # 9` =E2=80=94 works well, I see only `9` in the output. But when I'm trying to use same alias in the sub-shell (e.g. inside `$()`), it doesn't work anymore: `$ echo $(seq 1 10 # 9)` =E2=80=94 doesn't work, I see `1 2 3 ... 10` in th= e output. It seems for whatever reason everything after `#` in the sub-shell is ignor= ed. I've tried to disable INTERACTIVE_COMMENTS option without any success. `$ histchars=3D'!^' ; echo $(seq 1 10 # 9)` produces expected output, but it's obviously will break a lot of other things. I think it's a bug, because user should see consistent behavior in the same interactive session. It's easily reproducible with `zsh -df` and alias definition as I wrote above.