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 19792 invoked from network); 23 Aug 2022 02:14:36 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Aug 2022 02:14:36 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1661220876; b=F0r2LhXp6rV3AZoX1qHxqt/+MMg6rE4bAwoSE8FMyoA/JqMKSJdIi2xJyFQLaUk+e5RtUjCzOz fnAxLs82ppel2Pnlv5FwpC8pnn9eRzOCBGurtfQmc3bqLewIoXMPtvP6bHmRvYso5vI5XtgHb4 q3BjODiRF/3w8bt6hd2w1C76ICs/bCgkugAHVGqVZQxc7n9UEOIYOg+IbEBveT2FVu+9twWlRC MlMaBfDxqgk7EzPXSKSZr7BAiVRT1DRGrf0Nc23ptO51/yNEv8Cq8XbRrYnqa7SuM/ZdwT5/E3 t6N3lHQ+5qEhr3gDbpq/S1OhFFCAksaEbnIiikyLzag7Jw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f54.google.com) smtp.remote-ip=209.85.208.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=1661220876; bh=1l+bs6YDTeSfi96O0ic5ZVYdGpUiJpzLCThZ+tC4+Qc=; 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: MIME-Version:DKIM-Signature:DKIM-Signature; b=f+mU0rmZW2b0fgh9kXoUNcFqXjmCqBKqyEVSOsTv91THXHnYYEU3y2UfwhFx69/foV81Myc1qu jAAepU6W5q3wmBoovAi8Rq4FU1dafZelvx2FI2liq6/QwJK8HIAVZnvHh9fH1i+NAt1FCaoray O933CDFsCPpSAInD0aGMjxA3Zsr5DBwyCvngyx2+HWc7Xsw0fIly7ZbpvTKus1XNvtDKoeOIdJ L0FnGRwlOAx7TT8BTUZ1wgv9fy/X7JyjQjtBMS5JNHVT0g2G1A8Nn3PEnh9h1HPfmQ3ADyzQEX QRjCoagAZDzJS6fw/sLowhAEsYv3oGhmCQ4h/fJktibtEg==; 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:MIME-Version:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=/UaQWxXnyU0/ODOkgySv8jZVGMzGaKpS8f5mrZMIlTk=; b=q7fSbvQUJkuXK7AmorgraWtKiT wzN5j5cAEg8PRbBVv8gHimm9KJxsBULOKGyjs2JXPWd4zmdENyqmuD0OH7VgxVlK3QT2j/EEaAlQU A9ZBjz9DYD3RJKjeLJ6F/xRnpsWSifw8cwrYtY+mrcUdehZPoaT2IBHp758Zmdsyiyb3FpEUkxE0q E1CSF4wYeXzvZ2yy6GYeBngBj/GSSJdra1TunMgsVWwMReEZLOgWx2fU8IDSsn3TJBaCi2EA5J0IT tdUTvzIGCvadQz8xcaTIMDHTaEB7DroieaNlgJoPmi/JiWZKyjkZtFmuW6Laqb7k53DHJEuzOsyUT Z98B8lUA==; Received: from authenticated user by zero.zsh.org with local id 1oQJR4-000K0o-7s; Tue, 23 Aug 2022 02:14:34 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f54.google.com) smtp.remote-ip=209.85.208.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-ed1-f54.google.com ([209.85.208.54]:40490) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oQJQI-000JM3-33; Tue, 23 Aug 2022 02:13:47 +0000 Received: by mail-ed1-f54.google.com with SMTP id e21so11382125edc.7 for ; Mon, 22 Aug 2022 19:13:46 -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:mime-version:from:to:cc; bh=/UaQWxXnyU0/ODOkgySv8jZVGMzGaKpS8f5mrZMIlTk=; b=McN749ObR9ZgUXwiPFfbhCjfohtO5i362IqYtAnHWAXSkRjHUZi5lJz2kyvFqvigJt VvCSp/N3QbXSqNegbwzW6+66LmIFFoCiF9+LcVglmAhFZnWGk9QYOL633MUYZhIx0lh2 41WxSfYpUSdaTbpMsPWrMdzOSq1hwRU6IPXGmYXvzq2BPjL+WKjCGJybJeA50LboruYP 0uf1bucwBeNTlS+WwZ0mQF+Icu6uLpIsi3SJmtX/ZV8EzzbH8ul5aHH9vfB1bAk81LBK hKQ/noEHEh2B6RTmCbFXE9I6KyqUxtNVFvZ50I4hLLd7dytxnLaNZ25ecndAZqGoKMPM plSA== 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:mime-version :x-gm-message-state:from:to:cc; bh=/UaQWxXnyU0/ODOkgySv8jZVGMzGaKpS8f5mrZMIlTk=; b=MnR+rdjV/pUKUablXdXlUFKBXMY2Kl24WcxEm8YATyNtA/+U9c0g9BCWsZEQtW+KyW 0R3vPBlzCEomN+aPNqqtTMzOubbk0ctjRervKP7Z45PqQufb8osdh9STORT6GmK+8yFv 74w+4Kd90VGXQZIuffbi9hnx5q9ghEPBh0gHEuh+n3ooXcHB8MxcyQ+M1TcmmuF/TRb/ ujl1aF0SpbF7VLChnXBCGBlrxUUQM9AufX4xAyxgQlHAovHybmCU7RIDcrQdRsbY+HgZ vyOAhOfhdaP1PqHFvCGzdNiqd6HQpUE4uR9kT2fOCwGyfEOBKJw2OFJrjrtbgEHmoug3 W+qg== X-Gm-Message-State: ACgBeo38clRXqYwq3O+FM5weLo/4sHaP8BlcdlDoVjRAqEbrXP8wtgDb g09tdHcItih1UeAWcIpqY0Ur6anJTmelqyOTKZxztUNz X-Google-Smtp-Source: AA6agR5SHsNIjo4Pk5eGoMRYypF4R+iky2EpxwojqNqlbJr1ZlOLmlDSJFa+Alz/PDcG/QqB0/ajuZqCdWpdRKg7L+0= X-Received: by 2002:a05:6402:1c89:b0:445:e0fe:add4 with SMTP id cy9-20020a0564021c8900b00445e0feadd4mr1694606edb.14.1661220825206; Mon, 22 Aug 2022 19:13:45 -0700 (PDT) MIME-Version: 1.0 Reply-To: linuxtechguy@gmail.com From: Jim Date: Mon, 22 Aug 2022 21:11:58 -0500 Message-ID: Subject: anonymous function question To: zsh Content-Type: multipart/alternative; boundary="0000000000002e127405e6df1d6a" X-Seq: 27986 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: --0000000000002e127405e6df1d6a Content-Type: text/plain; charset="UTF-8" Hi everyone, I normally have interactive_comments set, but while doing some testing it got unset. So now comments within an anonymous functions typed in at the command line, or called back from history, outputs different errors depending on what is commented. Example: % () function> { function> #echo interactivecomments test function> } Outputs: (anon):2: bad pattern: #echo Adding 'setopt interactive_comments' before the echo command within the anonymous function has no effect. Only setting interactive_comments external to the anonymous function stops an error from occuring. This seems to be different then what is expected in a non-anonymous function. May have missed something, but do not see anything in the manual indicating this is the case. If so sorry for the noise. QUESTIONS: Is this normal for an anonymous function? Why doesn't setting interactive_comments within an anonymous function work? Thanks, and best regards, Jim Murphy --0000000000002e127405e6df1d6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi everyone,

I normally = have interactive_comments set, but while doing some testing it got unset.
So now comments within an anonymous functions typed in at the comm= and line, or
called back from history, outputs different errors d= epending on what is commented.
Example:
% ()
<= div>function> {
function> #echo interactivecomments test
function> }
Outputs:=C2=A0 (anon):2: bad pattern: #ech= o

Adding 'setopt interactive_comments' bef= ore the echo command within the anonymous
function has no effect.=

Only setting interactive_comments external to the= anonymous function stops an error
from occuring.

<= /div>
This seems to be different then what is expected in a non-anonymo= us function. May
have missed something, but do not see anything i= n the manual indicating this is the
case. If so sorry for the noi= se.

QUESTIONS:
Is this normal for an ano= nymous function?
Why doesn't setting interactive_comments wit= hin an anonymous function work?

Thanks, and best r= egards,

Jim Murphy
--0000000000002e127405e6df1d6a--