[augeas-devel] Re: Prefix for IniFile entries

Raphaël Pinson raphink at gmail.com
Wed Aug 27 10:41:38 UTC 2008


On Wed, Aug 27, 2008 at 12:03 PM, Free Ekanayaka <free at 64studio.com> wrote:

> |--==> On Wed, 27 Aug 2008 11:54:19 +0200, "Raphaël Pinson" <
> raphink at gmail.com> said:
>
>  RP> If it was added to inifile.aug, it would have to be added to all kinds
>  >>of
>  RP> entries though.
>  >>
>  >>I'm not sure to understand this last sentence. Do you mean that adding
>  >>indentation to inifile.aug would allow indentation in files like /etc/
>  >>dput.cf,
>  >>where it shouldn't be actually allowed according to its reference
> syntax?
>  >>
>
>   RP> No, I mean that indentation would have to be added to entries,
> comments, and
>  RP> records.
>
> Ah ok, and would that harm somehow? If indentation is not supported by
> a certain format and we really don't want to support by default, maybe
> it could be possible to find some way to make it optional without
> cluttering the current interface. I would really like to use
> inifile.aug for samba.aug, but indentation support is a show stopper.
>


I think we could add it to inifile.aug. Making it optional is another story.
Options in augeas lenses are not easy to deal with since you cannot have
optional arguments to functions nor default values for parameters in
functions. That's why inifile.aug ended up with pretty big calls for entry,
record and lns, and additionnal record_noempty and lns_noempty to deal with
files that don't accept empty lines. All the same, there would be a need for
entry_noindent, record_noindent and record_noempty_noindent calls, which
makes it a bit ugly to my taste. Ideas on this are welcome.


Raphaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080827/c0140084/attachment.htm>


More information about the augeas-devel mailing list