Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Block comments ala Ray



> On Feb 12, 2021, at 11:55 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> 
> On Fri, Feb 12, 2021 at 7:45 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>> 
>> 2021-02-12 07:30:23 -0800, Bart Schaefer:
>>> On Thu, Feb 11, 2021 at 11:40 PM Stephane Chazelas
>>> <stephane@xxxxxxxxxxxx> wrote:
>>>> 
>>>> :||:<<'# some comment'
>>> 
>>> That's exactly what the zsh-users discussion has been telling Ray he
>>> should not do, because at some point it's not going to work the way he
>>> expects.
>> [...]
>> 
>> How so?
> 
> What was said on zsh-users (not by me):
> 
> "Here-documents are not comments, despite your best efforts to abuse
> them for that role."

This was me, addressing someone with shaky shell fundamentals who
was aliasing the here-document idiom and expecting it to behave
identically to real comments (discarded during lexing, no further
impact on the script).

Naturally, the remark is rather less applicable to someone who
remains aware of the nature and limitations of the idiom.

vq



Messages sorted by: Reverse Date, Date, Thread, Author