[augeas-devel] Re: Multiline values in INI Files

Free Ekanayaka free at 64studio.com
Fri Aug 29 15:37:50 UTC 2008


Hi Raphaël,

|--==> On Fri, 29 Aug 2008 13:42:05 +0200, "Raphaël Pinson" <raphink at gmail.com> said:

  >>
  >>If introducing ugly _noindent declarations is the only viable way at
  >>the moment, but it makes inifile.aug enough flexible to deal with all
  >>kind of INI files, then I would go for it. Of course Better
  >>alternatives are welcome.
  >>

  RP> Just saw another reason for not introducing indent in inifile.aug : some
  RP> inifiles use indentation for multi-line values, like


  RP> key = this is a long
  RP>    text that belongs
  RP>    to the same field


  RP> This kind of entries are very tricky to deal with (this is why I haven't put
  RP> my hands on it yet) because ideally we would like to get

  RP> { "key" = "this is a long\ntext that belongs\nto the same field" }


  RP> but all I can think of getting is

  RP> { "key"
  RP>    { "1" = "this is a long" }
  RP>    { "2" = "text that belongs" }
  RP>    { "3" = "to the same field" } }

  RP> or

  RP> { "key" = "this is a long\n   text taht belongs\n   to the same field" }


  RP> which forces users to indent their value in a not very useful way.
  RP> Furthermore, I believe adding a line to such a field should use the same
  RP> indentation as the previous lines, which is currently not possible in
  RP> augeas.

I see your point, I think I have no other option than cloning
inifile.aug then, and possibly wait for this kind of issues to get
eventually fixed.

Ciao,

Free




More information about the augeas-devel mailing list