<div class="gmail_quote">On Thu, May 31, 2012 at 11:14 PM, David Lutterkort <span dir="ltr"><<a href="mailto:lutter@redhat.com" target="_blank">lutter@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, 2012-05-31 at 10:20 +0200, Raphaël Pinson wrote:<br>
> Quite a few configuration files support case insensitive keys. This is the<br>
> case of the (newly committed) postgresql.conf.<br>
><br>
> With this new regexpi function, we can do things like this:<br>
><br>
> augtool> match /files/etc/postgresql/8.4/main/postgresql.conf/*[label() =~<br>
> regexp('default_text_search_config')]<br>
>   (no matches)<br>
> augtool> match /files/etc/postgresql/8.4/main/postgresql.conf/*[label() =~<br>
> regexpi('default_text_search_config')]<br>
> /files/etc/postgresql/8.4/main/postgresql.conf/DEFAULT_teXt_search_config =<br>
> 'pg_catalog.english'<br>
<br>
</div>I wonder if we shouldn't just make path expressions match case<br>
insensitive, so that the path expression /foo/bar also matches<br>
{ "Foo" { "BaR" } } ... are there any examples where case matters and we<br>
would get unwanted matches ?<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br><br>Yes, I wanted to do that too. I had a look at pathx_parse, but I couldn't figure out how to make this work.<br><br>Eventually, I think both would be useful. A case-insensitive evaluation of paths would allow to use match/get/set/setm/clear/clearm/rm to manage nodes that can be case-insensitive, but regexpi would still be useful to evaluate values that are case-insensitive.<br>
<br>For the case-insensitive evaluation of paths, I was thinking that maybe this could be set somewhere in /augeas, like /augeas/nocase = [01].<br><br><br>Raphaël<br></div></div>