Date: Mon, 27 Apr 2026 11:24:23 -0700 From: "Simon J. Gerraty" <sjg@juniper.net> To: =?us-ascii?Q?=3D=3Futf-8=3FQ=3FDag-Erling=5FSm=3DC3=3DB8rgrav=3F=3D?= <des@freebsd.org> Cc: <src-committers@freebsd.org>, <dev-commits-src-all@freebsd.org>, <dev-commits-src-main@freebsd.org>, <sjg@juniper.net> Subject: Re: git: 566cc005812b - main - safe_set treat ':' and '#' differently Message-ID: <15177.1777314263@kaos.jnpr.net> In-Reply-To: <86jyts1xzr.fsf@ltc.des.dev> References: <69e8f964.39869.24418b55@gitrepo.freebsd.org> <86jyts1xzr.fsf@ltc.des.dev>
index | next in thread | previous in thread | raw e-mail
Dag-Erling Smørgrav <des@freebsd.org> wrote:
> > Treat '#' as a comment anywhere,
> > but ':' only at start of line.
>
> I can't quite figure out what your goal is with this, but it doesn't
> seem right: `:` is not at all a comment, it is just a built-in alias for
> the `true` command. Among other things, this means that (assuming a
> clean environment) these lines do absolutely nothing:
Not quite.
I use lines like:
: tag=$tag
to aid debugging. Eg:
for tag in `IFS=,; echo $DEBUG_SH`
do
: tag=$tag
case "$tag" in
without the : tag=$tag one cannot tell what the value of tag is
in the set -x output.
The goal here is to ensure a line like that will be ignored.
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15177.1777314263>
