Parses /etc/approx/approx.conf
Author: David Lutterkort lut@redha t.com ter
Approx | Parses /etc/approx/approx.conf |
Reference | This lens tries to keep as close as possible to `man 5 approx.conf` where possible. |
License | This file is licenced under the LGPL v2+, like the rest of Augeas. |
Lens Usage | See lns. |
Configuration files | This lens applies to /etc/approx/approx.conf. |
Examples | The Test_Approx file contains various examples and tests. |
Augeas Variables | |
eol | An Util.eol |
indent | An Util.indent |
key_re | |
sep | |
value_re | |
Augeas Lenses | |
comment | |
empty | An Util.empty |
kv | |
lns | |
filter |
See lns.
The Test_Approx file contains various examples and tests.
let eol = Util.eol
An Util.eol
let indent = Util.indent
An Util.indent
let empty = Util.empty
An Util.empty
let lns = (empty | comment | kv) *
An Util.eol
let eol = Util.eol
Delete end of line, including optional trailing whitespace
let eol = del /[ \t]*\n/ "\n"
An Util.indent
let indent = Util.indent
Delete indentation, including leading whitespace
let indent = del /[ \t]*/ ""
let key_re = /\$?[A-Za-z0-9_.-]+/
let sep = /[ \t]+/
let value_re = /[^ \t\n](.*[^ \t\n])?/
let comment = [ indent . label "#comment" . del /[#;][ \t]*/ "# " . store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ . eol ]
An Util.empty
let empty = Util.empty
Map empty lines, including empty comments
let empty = empty_generic empty_generic_re
let kv = [ indent . key key_re . del sep " " . store value_re . eol ]