[augeas-devel] Case insensitive match

David Lutterkort lutter at redhat.com
Wed Jan 26 00:21:58 UTC 2011


On Sat, 2011-01-22 at 18:06 -0500, Francis Giraldeau wrote:
> In some situations, a case insensitive match for path expression would
> be useful for some lenses. Is there any drawback of providing such
> functionality? I thought that putting a setting
> under /augeas/load/<lens>/nocase or something like this would be
> appropriate. We may need also a primitive in the lens for such setting? 

Are you talking about lenses or path expressions ? In lenses, you can
use /regexp/i to write down a case-insensitive regexp.

For path expressions, a global flag might be the right thing to do -
though it will require going through pathx.c with a fine-combed tooth to
make sure we replace all STREQ with STRCASEEQ etc. (macros defined in
internal.h) when the flag is set.

David





More information about the augeas-devel mailing list