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

Re: Block comments ala Ray



2021-02-13 08:35:21 +0000, Stephane Chazelas:
[...]
> Other possible avenues:
> 
> - <<# .. #>> allows inline comments, but looks more like a
>   redirection operator than a comment.
> - alternatively: <<#EOC .. EOC (or <<#{...} <<#[...] and the
>   usual pairs) to make nesting easier.

That one could allow to improve the 

for a (pod head{1..4} over item back begin end for encoding)
  aliases[=$a]=":||:<<'=cut' #"

We can already use ATM to add pod doc to zsh scripts to:

for a (pod head{1..4} over item back begin end for encoding)
  aliases[=$a]='<<#=cut'

(with the caveat that your pod documentation must not embed a
=cut anywhere, if we allow the delimiter to be anywhere).


> - The =word .. =cut of perl: conflicts with zsh's =cmd operator,
>   not nestable put would allow pod inline documentation.
[...]




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