zsh-users
 help / color / mirror / code / Atom feed
* anonymous function question
@ 2022-08-23  2:11 Jim
  2022-08-23  3:36 ` Lawrence Velázquez
  0 siblings, 1 reply; 4+ messages in thread
From: Jim @ 2022-08-23  2:11 UTC (permalink / raw)
  To: zsh

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-23  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23  2:11 anonymous function question Jim
2022-08-23  3:36 ` Lawrence Velázquez
2022-08-23  4:54   ` Jim
2022-08-23  7:21   ` Roman Perepelitsa

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).