Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Block comments ala Ray
- X-seq: zsh-workers 48069
- From: Juergen Christoffel <jc+zsh@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Block comments ala Ray
- Date: Tue, 16 Feb 2021 16:30:49 +0100
- Archived-at: <https://zsh.org/workers/48069>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/20210216153049.GA8000%40unser.net>
- In-reply-to: <CAH+w=7YZREq7FbJCCoWoJ-vQ7+P5Z=_mKB-aStoMiBRupqD_wA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YZREq7FbJCCoWoJ-vQ7+P5Z=_mKB-aStoMiBRupqD_wA@mail.gmail.com>
On Tue, Feb 09, 2021 at 10:05:13PM -0800, Bart Schaefer wrote:
Any other thoughts about this? Too horrible to consider? It needs
turning off in emulation modes and I haven't gotten to that yet.
While I love to use zsh for various scripts, I switch to e.g. perl for more
complicated / larger scripts (because doing everything in a shell looks
like using the mythical hammer which regards everything as a nail ;-)
That said, wouldn't it be possible to augment the comment parsing to use
something like perl's "plain old documentation" (pod) meachnism, e.g.
#=pod
This is a block comment
and $foo would not have a special meaning inside it
really
#=cut
This "#=" would allow to introduce more control statements inside the block
comment later on, just like perl's pod, which uses it's own little markup
language inside those blocks to mark up text
Cheers, JC
P.S. Even the use of the here document for block comments look less
horrible to me, because it's easily recognized when looking at a script.
--
It is easier to port a shell than a shell script.
-- Larry Wall
Messages sorted by:
Reverse Date,
Date,
Thread,
Author