[augeas-devel] Adding new lenses

Bryan Kearney bkearney at redhat.com
Fri Mar 14 17:04:10 UTC 2008


/me goes to read the doco.

-- bk


David Lutterkort wrote:
> On Fri, 2008-03-14 at 12:50 -0400, Bryan Kearney wrote:
>> I tend to see both.
> 
> I agree that both uses are useful.
> 
>> However, to achieve that I think it would be nice to have lense "types". 
>>   For example
>>
>> foo.properties
>> bar.properties
>> JarJar.properties
>>
>> all fllow the same structure. I would love for this to be one lens.
>>   Or.. three files with an "is_a" relationship to a single grammer.
> 
> You can do that already: you can write a properties.aug file that just
> has a grammar for Java properties files,
>         grammar properties
>         ...
>         end
> 
> and the files foo-properties.aug, bar-properties.aug, ... that just have
> a 'map' statement that applies that grammar
> 
>         map
>           grammar properties
>           include '/some/path/foo.properties' '/some/where/foo'
>         end
> 
> or stick everything in one file; Augeas loads all *.aug files on
> AUGEAS_SPEC_LIB and reads their grammars before it goes through the map
> statements. Therefore, the order in which they are defined (or in which
> files) does not matter.
> 
> David
> 
> 
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel




More information about the augeas-devel mailing list