[systemd-devel] [PATCH] ignore comments in multiline variable definitions

Lennart Poettering lennart at poettering.net
Wed Feb 13 10:41:54 PST 2013

On Wed, 13.02.13 05:26, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> On Wed, Feb 13, 2013 at 04:27:49AM +0100, Lennart Poettering wrote:
> > On Thu, 07.02.13 11:45, Michal Vyskocil (mvyskocil at suse.cz) wrote:
> > 
> > > Commented lines are ignored by default and are considered as end of a
> > > definition. If they ends on a backslash, they are just ignored and a
> > > next line is considered as a part of a definition.
> > 
> > I am pretty sure that continuation lines should top comments, not the
> > other way round. I fixed a couple of bugs in the code a few days ago,
> > but I figure the current git code looks pretty OK now, and does honour
> > continuation line before comments.
> > 
> > Anything left to do here?
> How about reversing the behaviour to honour comments before
> continuation lines? This goes against customary behaviour, but
> seems quite useful for unit files, since any line can be commented
> out without editing any other line.

In the shell at least continuation lines trump comments. Just type this
into your bash:

echo foo\

And it will output:


And I am pretty sure we should follow the shell in this regard, after
all these env files are supposed to be a subset of shell...


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list