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

David Lutterkort lutter at redhat.com
Fri Aug 29 18:00:15 UTC 2008


On Fri, 2008-08-29 at 13:14 -0400, Nate Foster wrote:
> The final q-lens would accept keys like this in the source
> 
>    "This is\n   a key\n    with wacky indentation"
> 
> map them to views with no indentation like this
> 
>   "This is\nakey with\nwacky indentation"
> 
> and produce sources with standard indentation, maybe like this?
> 
>   "This is\n  akey with\n  wacky indentation"
> 
> Is that what you want?

The problem with this is that Augeas tries very hard to keep changes
minimal, i.e. as close to what a human would change armed with only vi;
using q-lenses would mean that if I modify an unrelated part of the
file, the indentation of those multiline entries might change, too, even
though they haven't really been touched.

The q-lenses and canonizers are more applicable to situations where you
can enforce a standard formatting.

If issues like multiline entries become enough of a problem, I might add
them. It would definitely be nice to offer q-lenses in Augeas, but there
are always other thiongs that seem to be more pressing that need to be
done.

David





More information about the augeas-devel mailing list