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 3283 invoked from network); 12 Feb 2021 21:12:54 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Feb 2021 21:12:54 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613164374; b=TlkN5PMOdGj9H1Bg1yVCh4FpzV1O3oi/WXx9+G21+p8TekeInto+5V9pJHnUmpp65DD/dHTXe2 fvIrBV7Uf+XLpMHImfjyP62fxwZofsdRwi9fno3PEYcG9r67wb/DXMWyRLONOE9qe/lScpiJYf yQgBvNTAhtKM+Fr2Jc8Cp4jCNlYM52pGwMdsWlxi9iiX4pyBcphbtRWdWDWCDeo7xuQTrggaG7 pnoS0AePhDoVHk/FIWEVXQJ3g/0EJCHRqDZUiI7kgBUR01/XJa8SVFl39WsP5X2n3dwgjT6Sr+ aD+6r56am/htvDFIG7wqElPemhAXLG161KSj4XtreLqU4A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay9-d.mail.gandi.net) smtp.remote-ip=217.70.183.199; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613164374; bh=D3ga0CGp0yEeI5w/oRMwLeQnyBhnFrfEIHxuf8XCols=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:From:Date:DKIM-Signature; b=JImbZXlhrbrccuAyFEtSJPZjq/S2DaalSWZIOIV1lENVmip7UCRscY73TRY/6VK08FKMjsphBv TyO3Kt3vYG2+kEdRkQ+JxnESYC99W1WhdqN1kvBLQITI1f7RQQNj9n8o8YpHLKgovQHHcZtNz7 zz3c6hDrXjXZcBejjZpv+novwFnwKyhBBsIE7m3YUuQ+ADGbGM9xfP2eZGCi4xcqK54pn4cUdD 9F9vsCmBBjKhkHSbstM0RFc/nx+4G+knHrxm9A8rVFAvyqHaYwUcP7uJ2fYKBQo4VvRF5Z/NZ/ WmiLlGBjpHd+Wz1iknaq6sIKJq+6fmkv2Co5PwGjhgCv4w==; 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:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=u/OwxnqL/MpEiJWpFZLw/jwXXGH4jHsCCibHU/SuqV0=; b=h3KEVSdYEnd9delA9yxCGJvj0Z 4vd557ss/CrDqSaEX51IXfw9yj0x+Y9esXnxCCA/+WM7ZJ5XyVyhbY4P/6H1VIjx/rqBNPzbi/F1m pot+/dSJnV1+i5tZMKjteceI4V3lHqmyxOhP2FQ+T41sgpnKkuxyx6QjD1s0aIWeAWIPP3Fg4Ed+h ZZLhepp3TfQga2EFng6IwHELdWupahuWVeym0KmjT9WTc7y1SqXmPtvK/+m1NoxeG09n6DQIMpcgh 9gMmhBiC35eYOL40brDy0qL9QP96YEjU7gmQDn+6q9HNlJ6GvgZJLjtXsrBCD39bRBuFEf593hcPx aBvJ+JSA==; Received: from authenticated user by zero.zsh.org with local id 1lAfkC-0002EU-Ra; Fri, 12 Feb 2021 21:12:52 +0000 Authentication-Results: zsh.org; iprev=pass (relay9-d.mail.gandi.net) smtp.remote-ip=217.70.183.199; dmarc=none header.from=chazelas.org; arc=none Received: from relay9-d.mail.gandi.net ([217.70.183.199]:55461) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lAfjx-00023H-LQ; Fri, 12 Feb 2021 21:12:38 +0000 X-Originating-IP: 5.71.197.169 Received: from chazelas.org (0547c5a9.skybroadband.com [5.71.197.169]) (Authenticated sender: stephane@chazelas.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 4A559FF805; Fri, 12 Feb 2021 21:12:35 +0000 (UTC) Date: Fri, 12 Feb 2021 21:12:35 +0000 From: Stephane Chazelas To: Lawrence =?utf-8?Q?Vel=C3=A1zquez?= , Bart Schaefer , zsh-workers@zsh.org Subject: Re: Block comments ala Ray Message-ID: <20210212211235.wceitj3w5qr4bv3x@chazelas.org> Mail-Followup-To: Lawrence =?utf-8?Q?Vel=C3=A1zquez?= , Bart Schaefer , zsh-workers@zsh.org References: <20210212074031.7746vg37xykniem5@chazelas.org> <20210212154547.iy35rp4ijaef22ld@chazelas.org> <20210212210236.rsmrs65lmtxzoqzc@chazelas.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210212210236.rsmrs65lmtxzoqzc@chazelas.org> X-Seq: 48024 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: 2021-02-12 21:02:36 +0000, Stephane Chazelas: [...] > as the parsing of the inside of `...` is deferred in all shells > except ash-based ones; see $shell -c ':||echo `for`'. A bit like > in eval 'echo x # comment'. > > It's also deferred with the $(...) form in bash (but bash only > AFAICT): > > $ bash -c $'f() { echo $(echo x # comment\n); }; typeset -f f' > f () > { > echo $(echo x # comment > ) > } [...] Hmmm, actually in zsh, there is parsing going on there: $ zsh -c 'f() { echo $(for); }; typeset -f f' zsh: parse error near `)' zsh:1: parse error near `$(for); }; typeset -...' But still, the comments appear not to be discarded at that point: $ zsh -c $'f() { echo $(echo x # comment\n); }; typeset -f f; f' f () { echo $(echo x # comment ) } x -- Stephane