zsh-users
 help / color / mirror / code / Atom feed
From: Jim <linux.tech.guy@gmail.com>
To: zsh <zsh-users@zsh.org>
Subject: anonymous function question
Date: Mon, 22 Aug 2022 21:11:58 -0500	[thread overview]
Message-ID: <CA+rB6GKnzYir24SimTsqvROE=h22crW-LLFj8LR8N6ufD_Lw=w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1330 bytes --]

             reply	other threads:[~2022-08-23  2:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  2:11 Jim [this message]
2022-08-23  3:36 ` Lawrence Velázquez
2022-08-23  4:54   ` Jim
2022-08-23  7:21   ` Roman Perepelitsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+rB6GKnzYir24SimTsqvROE=h22crW-LLFj8LR8N6ufD_Lw=w@mail.gmail.com' \
    --to=linux.tech.guy@gmail.com \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).