Re: [PATCH] config: add an includeIf.env{Exists,Bool,Is,Match}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

>> Sure, but at that point, we'd probably want some quoting mechanism
>> for the literal to be compared, e.g.
>> 
>> 	[includeIf "env:PATH ~= \"(:|^)/usr/bin(:|$)\""]
>
> Ick. The extra quoting of the internal double-quotes is pretty horrid to
> look at. Also, how does one match a double-quote in the value? \\\"?

Ick indeed.  I didn't mean to say you must always dq quote.  It
started more like 

	includeIf "env:VAR == ' value with leading whitespace'"

(or use \" inside ""-pair to mean a double-quote) as a demonstration
of an escape hatch needed if we took your "let's by default strip
the whitespace around the value" example in the message I was
responding to.

Just like we in most cases do not have to quote the value in the
configuration files, unless you have strange needs like wanting to
express a value with leading whitespace that should not be stripped,
if we were to go this route, 

> If it were optional, that would make the common cases easy (no dq, no
> whitespace), and the hard ones possible.

Yup.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux