[augeas-devel] making a new lense, having a weird matching issue
Pat Riehecky
riehecky at fnal.gov
Tue Feb 11 21:18:26 UTC 2014
I'm certainly overlooking something obvious, but.....
Here is a way slimmed down version....
Can I get a quick hand un-sticking my brain?
my config file is:
makestep 10 3
It is the only line and it may or may not be followed by a comment.
the '10' is a threshold and the '3' an upper limit
My current (edited) stab at this is mylense.aug:
module Mylense =
autoload xfm
let val_sep = Util.del_ws_spc
let makestep = [ val_sep . key /makestep/ . val_sep .
[ label "threshold" . store Rx.integer ] .
[ label "limit" . store Rx.integer ] ] .
Util.comment_or_eol
let lns = ( Util.empty | Util.comment | makestep )*
let filter = (incl "/tmp/testfile")
let xfm = transform lns filter
----------------------
I'm trying to get the resulting tree to look like:
/augeas/files/tmp/testfile/makestep/threshold = 10
/augeas/files/tmp/testfile/makestep/limit = 3
--
Pat Riehecky
Scientific Linux developer
http://www.scientificlinux.org/
More information about the augeas-devel
mailing list