From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6040 invoked from network); 12 Feb 2021 16:55:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Feb 2021 16:55:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613148941; b=1YTt4t614CMz/4c3KMZhj/krG5vVjivM3gnYa08+h5837tylzUlZ8CYLASTFkqlutUHfxIf0Tp 7GEIJx6KXM0xcpBrkxdtHI9F8p0YpAKTZ/ZMNSU0BKJUJcWZs0U+yQ3E/ahZCUNNHZu+9Vsg7H BqZmb1496k26kHJf6vFuOQGPRmU2QDMAs1z0anvQ4nbT7RCvoNf0/0gcB7AHQDdex/lVhayFp9 yPfkz3GqOJ2u1GB7Chkjl/QNAwMNzHJAy0Uswyr7ddOwb4a01rwWgL4gZQi+Upj/O3mxYSGX0C oKBuGDdP6wRf9qR+juQ70vHt2tGdYq7i7LTdwpAEAwnAGg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f173.google.com) smtp.remote-ip=209.85.167.173; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613148941; bh=w7a3KQDZi1v58qgfzk1obkJTwZ3DaK1J7njsFHmxxkY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=YPtrd8jHUTirXF6CvoT792mX6nr5KlvRzYWUF7Qkf0iF3cYUWzkszTZP2qVipxRD7KRihhuyMB PSk79SeNLYKKlynHRAaT1cOu1TRBxuo9ZLoZgutH7TshoBMkoeZwucDAEBqd8HGqdIiM55hHBK wx5eVr53sX0g9zXyWzhVp6b37SEOURZvhKAgx+222FxudvAII2PAtXwKHABzmtQxEL23j05O+4 8Z2dZ7xs25PKvv7IDh+2TKEZKFyzYTeSFc+0fObPtoTyNe61FP3eopl+aV3aRRS657CjIMjSTm gZ1umpmxWGerk/yddltvP7V6Qtfp0AHENMlttvfsUgazDw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=UUnQJaUFsHTec+L9XM5QtA8zToFgwdpD0mRO3VOuk6E=; b=jsXNB+mLK4+MyJOj+IxHRU3nPT Nn/yOULsfivF6iSONfM/zyblbJzi7fQT8B8G17k4KfYif7cWxMMDcFlDakTapP50efA7rZN8rMa0W dZWf+ptEBnBwi8MnRgSr8sRiIpAamwn5NXFLkFP0dR2FDr2odRisEG20Qu3rnLMCnstI8zrpiaW1/ +PBGQ88I5EkTN4ED3D4OlsREcL39GXH2KLEgbkJF6/kOtw0iL6bB3bzH5TIW+Y/YCOm1td/6osIAz pcEUJYDlmEJX0lVFfxxfT3MLWh0EtcHwdM1BEDUX6aip+HTMgFC+N2gatAEiQ4uweN6E5t9yoTSFh D1DVzuLw==; Received: from authenticated user by zero.zsh.org with local id 1lAbjH-000Kxg-It; Fri, 12 Feb 2021 16:55:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f173.google.com) smtp.remote-ip=209.85.167.173; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f173.google.com ([209.85.167.173]:37080) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lAbiv-000KoP-4K; Fri, 12 Feb 2021 16:55:18 +0000 Received: by mail-oi1-f173.google.com with SMTP id y199so302016oia.4 for ; Fri, 12 Feb 2021 08:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=UUnQJaUFsHTec+L9XM5QtA8zToFgwdpD0mRO3VOuk6E=; b=GrTRCWU/6guXpHTQ4SFdA1tyH8kTsMSj6z8+jiA8V4PmeGPjLgmYbfLro/biOuPKBr oXAJfrJSw4zm9kkgKhuz3bTlPWXRzXK+MzdYMfnkxMXFRDjF46be9IyWbLExj4poAcJN SpT6smCeWSZGDaunoVbLeAbs2MTMZLsqCos+gH37l/7a7GNywE2QgBYla+sSf6x3R/nL i7WKLWETEJfHi/x4H27EyMKml4LYjtyELa9RxXCsXdD3Zye0sGZUUCOc+5sLm5Z8OE4A Ms10hzMV0KoamCLtquEqQa0t42ZJr25qgFtyJHdl+C34JjDS2KGqP7P5TAJgAJ2v6neQ T59Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=UUnQJaUFsHTec+L9XM5QtA8zToFgwdpD0mRO3VOuk6E=; b=Jv+U3Sw78R8RPwpTV/hzQSlgtfOO5C4KPXiG7fVfVVxnleOlCRUHf7GGkIsD2AxMml nbjQRlm6c6hfGXNqG/ftJwm4HKCK0Z+trkL0YpENidenUTvrukcsCh900ntP38Y2UWPU Jg0Fbi/dGxr+Az/hjlu0XGvB97mSVkEkV747+q/p/IcgpNP7yM8zZJTDTGFh/qzWQcaH DkV6Dj+9CDqYiGzab6G24Pq4ZhcnUH2TpgmK/behsB+J3vG1JXCX6t6lz/7Jw28xwSFD +7vL8tx7Q4aZ7EtSi2ilgolgFOiC7FRpHB3A7EFUM/2hNKrQ1eB5WM8xkv4hHx8Euurl nFnA== X-Gm-Message-State: AOAM531Yz2jjR8LKkpxouPtIu5KKo0TH9azrNr14hRJdrQNeTrwpHXHS CjtJUs5WMQ1uUORGuwQBcX8CQ6gf9zsOtloYlVI7jN6WNJ6Fcg== X-Google-Smtp-Source: ABdhPJw0pBymmF9MSxjaPjWohbkP5PfsKGJKwupxAZ6D+scR2cyk8FWyIatrQwAqResHdQyS3oMAU99UrlGRnp2ruTE= X-Received: by 2002:aca:4e8e:: with SMTP id c136mr191265oib.173.1613148915861; Fri, 12 Feb 2021 08:55:15 -0800 (PST) MIME-Version: 1.0 References: <20210212074031.7746vg37xykniem5@chazelas.org> <20210212154547.iy35rp4ijaef22ld@chazelas.org> In-Reply-To: <20210212154547.iy35rp4ijaef22ld@chazelas.org> From: Bart Schaefer Date: Fri, 12 Feb 2021 08:55:04 -0800 Message-ID: Subject: Re: Block comments ala Ray To: Bart Schaefer , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48020 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Fri, Feb 12, 2021 at 7:45 AM Stephane Chazelas wrote: > > 2021-02-12 07:30:23 -0800, Bart Schaefer: > > On Thu, Feb 11, 2021 at 11:40 PM Stephane Chazelas > > wrote: > > > > > > :||:<<'# some comment' > > > > That's exactly what the zsh-users discussion has been telling Ray he > > should not do, because at some point it's not going to work the way he > > expects. > [...] > > How so? What was said on zsh-users (not by me): "Here-documents are not comments, despite your best efforts to abuse them for that role." "The construct you use has side-effects you've overlooked, which mean your fashion of comments will backfire in a way that you don't see yet." (Paraphrased) There are places where you might want comments but that command syntax is not allowed, for example in the midst of "for ... do". > How would it be different from your !# .. #! ? For one thing, the content of a here-document is "compiled" into the wordcode of the script or function, even if the command referencing that here-document is never going to execute. True comments are discarded during lexing.