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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7363 invoked from network); 23 Aug 2022 04:56:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Aug 2022 04:56:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1661230597; b=GKuCXZXzfoPtfWAil5VnvvLRHFONKIwLCQH7wr64S0Dxwv3cl0o5yJxsg+OaB1ko7+oafFe7rX NWfju6pYQj/AhyiAStiMcWypNS+iqvV9N754sLOcAaOoD7G6AQsUaXN/oWr+VJVRxkW+jLIUrS 1f+fhd+ClV3yxgRmo7bKk1J0Gw9i1h6uY23/27ykDQy0KZzbnzVHHqs/g929bZiv/Axp6yB+Mm 0qDXsB3PRZfP1ASbWxhP3TSPsZdMBCcB5z74NwCVwB6XYkI4eIZwVgBHVLXzScbz9YpTDcbLxf LXT6yWqeM8sVECMKq7XK9Pajb56o2TUzgF0THf6FmtKAiQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1661230597; bh=YsqAIG4mmzAP32lqZz/zNPEBmtXYQTETLHHYa742V1k=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:Reply-To: In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=gj7DNrs/ofIoJVbB5dPjI2hBLSAOR35U8crEaAn3S2L+oxfUdlX8XlGtMqo1ugoTH79LuPfErI CFUIrvQhDH/jzKL0e2wZxBQy7nfGpwRg98ZnKMQ8wn6BxIINFHHQMvmWtoDE15V2QBOz9ygG+4 Xb7rIJCROadP5TmQfjmlzEWOGf1jcKHfvOedAvqPxOK+M3oTk1LL45hTzuVkz/6EXCUyo9tI76 JYGgSDS0NdyBEdHp+OG0oppdhAzZ0ZRDUzqFl2PpWrawmnv0huNuA3cb6z7oi3jJMKQiusfZYs /oDFtZOUO6h5xIEoloAEtpxA6ZD2kWGLzR1Cydtzqp7uxQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:Reply-To:In-Reply-To:References:MIME-Version:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=JBufFlVZP4IXpS/PiFMUWn81SHyArGDHIvU69TnHijw=; b=RIbUJ1N+hRtbgJJ4YIvFauErHm yyYUOIn6aCpAAlwKrwFZs1Ishkn6lo2xh/g97EjVZ9g19WAhghx4ozys0dSFS+nXLKWjS8rQ0zIyQ wgDRJC2b/8ou5OsMH1Hy1zVFLvQyfHZkRYYqVSgKHFth5+ptL+S1+DMGjsSnH20r3ntKfbxx5tKzp 8MmzCgQRSn/gN2i7LHqGzz5NIJtSgPIPviQ1+dsT1Pi8kkwzynNj/ka/1rFbJFWhjtzH9M4p/ZzlH 5YXi/QmwgR3FfMv3pHrdFlsA1PV3683+NymYJZGCuGio9ci6TIkSN0eFFSUp1UrEvdNhp57lcLnR3 TyJmsLCw==; Received: from authenticated user by zero.zsh.org with local id 1oQLxt-0002gJ-2P; Tue, 23 Aug 2022 04:56:37 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f54.google.com ([209.85.218.54]:45788) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oQLxD-00020P-6B; Tue, 23 Aug 2022 04:55:56 +0000 Received: by mail-ej1-f54.google.com with SMTP id gt3so12720407ejb.12; Mon, 22 Aug 2022 21:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc; bh=JBufFlVZP4IXpS/PiFMUWn81SHyArGDHIvU69TnHijw=; b=fgdEPEly1Q57o8jan+7+e8RDL9ZcL0B/banPhFXyeLeo1B+PQpFs/Avq+gPl4D701a dBoG6ApE2L2SOkXuu5BbccCfZqAdcsSkId0MHo46e6mVUyiCuejWJqWrPBYdv9RmVCaJ o0XM/+jgIOITa9QdB/W/Puulz23lrq8pIfkbYTnKc60tsdwQ6Lpcnu/pBSkWqYRLUKYN VbU2dqVhMlNrOPUcLfl7Lsflxru8ZHFuMWfgFKLoZF8SSpYr5D/GO3nD3GuNInqLCuw8 vZLa7cnCJDG9YHoupVVmk1F37CQGZ+FDfPPU06nK9wAv4F1NTvtjG+k3Rfcy5ByMwWye zvvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=JBufFlVZP4IXpS/PiFMUWn81SHyArGDHIvU69TnHijw=; b=tmBkR1+pHuyrNdNVnwR43gan1eLQCYyOaEfnRWgboysJLCDZGzyJN00OacWisGG3m6 4xIx5Q9n8jnM9TFM444B0tCHMicZvWcSmadMNjytanjYyifxFPG5ixfGODw2algWFL0G OG3I9JjTmkCeVzUHdylPmUiuy4ePisS9nEpuo8Ceyx0Yibk22ErYlRKPrPV/PC2mbNIQ w6QptEdXbqSpdUu9KUwXvsxc4KgLtEwfuUHhc835gTbgjflvcHp/OUMRevwESx7kfjIX V85CYHtZ2VGE06kkrn3JRvgidwD52UbfpdHr92fGhIIlhQ51Z/aqMxvCyZ5kFUQL2dPR YJzQ== X-Gm-Message-State: ACgBeo1Nrq5FZGvjaqPDO+5HTXesPgoTHKFz15Sv2mI3ZxR07uSTkCph fSuDiQcJCoj9WiV8gtcvhheE9+WVvkS2QEtevNH4FvUyeho= X-Google-Smtp-Source: AA6agR51W6ZBr2uETyS3H1o+ohWRzqL4ehXMyLb5Hrh7r32exX14IPhZmwXUriSnN7cwpQDBvLnOTOlveO7nDvpUNIs= X-Received: by 2002:a17:907:7202:b0:73d:6478:5ba5 with SMTP id dr2-20020a170907720200b0073d64785ba5mr9196873ejc.640.1661230554413; Mon, 22 Aug 2022 21:55:54 -0700 (PDT) MIME-Version: 1.0 References: <4f73130d-1d7b-46af-ab04-72a04fc89727@www.fastmail.com> In-Reply-To: <4f73130d-1d7b-46af-ab04-72a04fc89727@www.fastmail.com> Reply-To: linuxtechguy@gmail.com From: Jim Date: Mon, 22 Aug 2022 23:54:07 -0500 Message-ID: Subject: Re: anonymous function question To: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= , zsh Content-Type: multipart/alternative; boundary="0000000000001600dd05e6e16155" X-Seq: 27989 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --0000000000001600dd05e6e16155 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 22, 2022 at 10:36 PM Lawrence Vel=C3=A1zquez w= rote: > On Mon, Aug 22, 2022, at 10:11 PM, Jim wrote: > is normal for an anonymous function? > > This is not just about anonymous functions. You can observe the > same behavior with regular functions and other complex commands. > > Lawrence, Thanks for responding. Guess this is what I get for always having interactive_comments set while in interactive mode. Just assumed it was the way it should work. You know what they say about assuming. DON'T! - Comment removal is performed during parsing. Thus, setting and > unsetting INTERACTIVE_COMMENTS changes how parsing is done. > - A complex command is parsed *in its entirety* before *any* of its > commands are executed. Thus, a command within a complex command > cannot affect how the rest of the complex command is parsed. > > Therefore, a complex command cannot enable or disable comments > within itself. It can affect subsequent commands, though: > Need to let this sink in a bit. Having a problem with how 'parsing' takes place with interactive/complex commands. If this is the case, it is what it is then. I don't know whether any of this is explicitly described in the > documentation. > I did find this. Missed it on previous searches do to the hyphenation. COMMENTS In non-interactive shells, or in interactive shells with the INTERAC=E2=80=90 TIVE_COMMENTS option set, a word beginning with the third character of the histchars parameter (`#' by default) causes that word and all the following characters up to a newline to be ignored. Blanket statement for sure. Doesn't get into any detail. Regards, Jim --0000000000001600dd05e6e16155 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Aug 22, 2022 at 10:36 PM Lawr= ence Vel=C3=A1zquez <larryv@zsh.org> wrote:
On Mon, Aug 22, 2022, at 10:11 PM, Jim wrote:
is normal for an anonymous function?

This is not just about anonymous functions.=C2=A0 You can observe the
same behavior with regular functions and other complex commands.

=C2=A0
Lawrence,

T= hanks for responding.

Guess this is what I get for= always having interactive_comments set
while in interactive mode= . Just assumed it was the way it should work.
You know what they = say about assuming. DON'T!

- Comment removal is performed during parsing.=C2=A0 Thus, setting and
=C2=A0 unsetting INTERACTIVE_COMMENTS changes how parsing is done.
- A complex command is parsed *in its entirety* before *any* of its
=C2=A0 commands are executed.=C2=A0 Thus, a command within a complex comman= d
=C2=A0 cannot affect how the rest of the complex command is parsed.

Therefore, a complex command cannot enable or disable comments
within itself.=C2=A0 It can affect subsequent commands, though:
=C2=A0
Need to let this sink in a bit.=C2=A0 Having a p= roblem with how 'parsing' takes
place with interactive/co= mplex commands. If this is the case, it is what
it is then.

I don't know whether any of this is explicitly described in the
documentation.

I did find this. Missed = it on previous searches do to the hyphenation.

CO= MMENTS
=C2=A0 =C2=A0 =C2=A0 =C2=A0In =C2=A0non-interactive =C2=A0shells,= or in interactive shells with the INTERAC=E2=80=90
=C2=A0 =C2=A0 =C2=A0= =C2=A0TIVE_COMMENTS option set, a word beginning with the third character = =C2=A0of
=C2=A0 =C2=A0 =C2=A0 =C2=A0the =C2=A0histchars =C2=A0parameter = (`#' by default) causes that word and all the
=C2=A0 =C2=A0 =C2=A0 = =C2=A0following characters up to a newline to be ignored.

Blanket statement for sure. Doesn't get into any detail.
<= div>
Regards,

Jim
--0000000000001600dd05e6e16155--