Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Block comments ala Ray
- X-seq: zsh-workers 48014
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Block comments ala Ray
- Date: Fri, 12 Feb 2021 07:40:31 +0000
- Archived-at: <https://zsh.org/workers/48014>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2021-02/20210212074031.7746vg37xykniem5%40chazelas.org>
- In-reply-to: <CAN=4vMoYj3WbBk3BL98buiYcf7rkLtw=b9v_f0p1C4zqYRB7xg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- References: <CAH+w=7YZREq7FbJCCoWoJ-vQ7+P5Z=_mKB-aStoMiBRupqD_wA@mail.gmail.com> <CAN=4vMonpZHPSarsC778_GMbD_h4ioTwT+bTFU=FZ7_zbXaMqQ@mail.gmail.com> <CAH+w=7Zd2gY-s5T1dDNEEujAh6197MzrUD-iZrVwZLzD=L7xVQ@mail.gmail.com> <CAN=4vMoYj3WbBk3BL98buiYcf7rkLtw=b9v_f0p1C4zqYRB7xg@mail.gmail.com>
2021-02-12 07:41:50 +0100, Roman Perepelitsa:
[...]
> And almost never like this:
>
> /*
> Lorem ipsum
> dolor sit amet
> */
>
> So block comments in my experience are most often used as if they were
> single-line comments.
[...]
Block comments are useful to comment out sections of code, as in
#if I_STILL_NEEDED_THIS
some
now dead
code
#endif /* I_STILL_NEEDED_THIS */
There's a POSIX sh equivalent for that though:
:||:<<'# some comment'
some
now dead
code
# some comment
(with the added benefit that you can just comment the :||: line
if you find that you want that code after all.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author