Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Block comments ala Ray
On Fri, Feb 12, 2021 at 1:12 PM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>
> 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
The literal text of what's contained in $(...) is retained, but not
comments in the function body itself.
% Src/zsh -f <<<$'f() { # this is a comment\necho $(echo x #
comment\n); }; typeset -f f; f'
f () {
echo $(echo x # comment
)
}
x
Messages sorted by:
Reverse Date,
Date,
Thread,
Author