[augeas-devel] inifile and ";" in value

Raphaël Pinson raphink at gmail.com
Thu Jun 9 08:21:21 UTC 2011


On Thu, Jun 9, 2011 at 10:09 AM, Thomas Mueller <thomas at chaschperli.ch> wrote:
> hi
>
> I have a ini file which need "-quotes around a value because it contains
> a ; in the value.
>
> augeas fails on that file. IMHO this is the cause:
>
> let sto_to_comment     = Util.del_opt_ws ""
>                         . store /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/
>

That is right. Standard INI File support ";" as a comment separator,
so these have to be exluded from the regexp to match values.

I've met this issue already, so maybe I should adapt inifile.aug to
propose two kinds of sto_to_common definitions, depending on the which
kind of comments are supported.

For now, if you want to fix that, the easiest way is to avoid using
IniFile.entry and fork it in  your code instead.



Raphaël




More information about the augeas-devel mailing list