/usr/share/augeas/lenses/dist
NameSizeModeActions
tests/-0755rm
access.aug36690644editdlrm
activemq_conf.aug15090644editdlrm
activemq_xml.aug8640644editdlrm
afs_cellalias.aug16020644editdlrm
aliases.aug22310644editdlrm
anaconda.aug7750644editdlrm
anacron.aug25450644editdlrm
approx.aug12860644editdlrm
aptcacherngsecurity.aug7260644editdlrm
aptconf.aug39890644editdlrm
aptpreferences.aug18310644editdlrm
aptsources.aug20230644editdlrm
apt_update_manager.aug11350644editdlrm
authinfo2.aug14760644editdlrm
authorized_keys.aug18830644editdlrm
authselectpam.aug37840644editdlrm
automaster.aug33910644editdlrm
automounter.aug41480644editdlrm
avahi.aug14170644editdlrm
backuppchosts.aug10140644editdlrm
bbhosts.aug43420644editdlrm
bootconf.aug37360644editdlrm
build.aug170450644editdlrm
cachefilesd.aug20510644editdlrm
carbon.aug15740644editdlrm
ceph.aug7190644editdlrm
cgconfig.aug34470644editdlrm
cgrules.aug24320644editdlrm
channels.aug39290644editdlrm
chrony.aug139820644editdlrm
clamav.aug17160644editdlrm
cmdline.aug5000644editdlrm
cobblermodules.aug3980644editdlrm
cobblersettings.aug22950644editdlrm
collectd.aug8690644editdlrm
cpanel.aug8240644editdlrm
cron.aug41430644editdlrm
cron_user.aug12900644editdlrm
crypttab.aug31510644editdlrm
csv.aug12120644editdlrm
cups.aug4590644editdlrm
cyrus_imapd.aug15460644editdlrm
darkice.aug7730644editdlrm
debctrl.aug37010644editdlrm
desktop.aug14220644editdlrm
devfsrules.aug6190644editdlrm
device_map.aug6200644editdlrm
dhclient.aug68500644editdlrm
dhcpd.aug213790644editdlrm
dnsmasq.aug22090644editdlrm
dns_zone.aug29630644editdlrm
dovecot.aug40730644editdlrm
dpkg.aug28510644editdlrm
dput.aug22130644editdlrm
erlang.aug44320644editdlrm
ethers.aug6630644editdlrm
exports.aug24240644editdlrm
fail2ban.aug18350644editdlrm
fai_diskconfig.aug95020644editdlrm
fonts.aug8190644editdlrm
fstab.aug12570644editdlrm
fuse.aug8710644editdlrm
gdm.aug18410644editdlrm
getcap.aug16100644editdlrm
group.aug17030644editdlrm
grub.aug113110644editdlrm
grubenv.aug5080644editdlrm
gshadow.aug22400644editdlrm
gtkbookmarks.aug8550644editdlrm
hostname.aug4350644editdlrm
hosts.aug4850644editdlrm
hosts_access.aug44260644editdlrm
host_conf.aug19410644editdlrm
htpasswd.aug10430644editdlrm
httpd.aug75270644editdlrm
inetd.aug63650644editdlrm
inifile.aug158590644editdlrm
inittab.aug7800644editdlrm
inputrc.aug16620644editdlrm
interfaces.aug47330644editdlrm
iproute2.aug3230644editdlrm
iptables.aug27030644editdlrm
iscsid.aug6840644editdlrm
jaas.aug16120644editdlrm
jettyrealm.aug15520644editdlrm
jmxaccess.aug13860644editdlrm
jmxpassword.aug13750644editdlrm
json.aug21980644editdlrm
kdump.aug29770644editdlrm
keepalived.aug109580644editdlrm
known_hosts.aug19790644editdlrm
koji.aug8980644editdlrm
krb5.aug71490644editdlrm
ldif.aug78330644editdlrm
ldso.aug10850644editdlrm
lightdm.aug17930644editdlrm
limits.aug20660644editdlrm
login_defs.aug6150644editdlrm
logrotate.aug43330644editdlrm
logwatch.aug14730644editdlrm
lokkit.aug22160644editdlrm
lvm.aug20790644editdlrm
mailscanner.aug16990644editdlrm
mailscanner_rules.aug29110644editdlrm
masterpasswd.aug44680644editdlrm
mcollective.aug11120644editdlrm
mdadm_conf.aug102890644editdlrm
memcached.aug12720644editdlrm
mke2fs.aug64360644editdlrm
modprobe.aug34200644editdlrm
modules.aug7410644editdlrm
modules_conf.aug10680644editdlrm
mongodbserver.aug12010644editdlrm
monit.aug21820644editdlrm
multipath.aug43110644editdlrm
mysql.aug19940644editdlrm
nagioscfg.aug21380644editdlrm
nagiosobjects.aug16040644editdlrm
netmasks.aug17320644editdlrm
networkmanager.aug22330644editdlrm
networks.aug11160644editdlrm
nginx.aug37400644editdlrm
nrpe.aug18270644editdlrm
nslcd.aug101110644editdlrm
nsswitch.aug23860644editdlrm
ntp.aug54190644editdlrm
ntpd.aug48610644editdlrm
odbc.aug14500644editdlrm
opendkim.aug31740644editdlrm
openshift_config.aug25240644editdlrm
openshift_http.aug10520644editdlrm
openshift_quickstarts.aug10440644editdlrm
openvpn.aug228170644editdlrm
oz.aug13840644editdlrm
pagekite.aug26630644editdlrm
pam.aug26370644editdlrm
pamconf.aug12560644editdlrm
passwd.aug36090644editdlrm
pbuilder.aug6380644editdlrm
pgbouncer.aug14620644editdlrm
pg_hba.aug30430644editdlrm
php.aug23930644editdlrm
phpvars.aug39470644editdlrm
postfix_access.aug7710644editdlrm
postfix_main.aug15550644editdlrm
postfix_master.aug19500644editdlrm
postfix_passwordmap.aug13120644editdlrm
postfix_sasl_smtpd.aug6970644editdlrm
postfix_transport.aug15140644editdlrm
postfix_virtual.aug13470644editdlrm
postgresql.aug21520644editdlrm
properties.aug23570644editdlrm
protocols.aug10800644editdlrm
puppet.aug15580644editdlrm
puppetfile.aug23270644editdlrm
puppetfileserver.aug31900644editdlrm
puppet_auth.aug20010644editdlrm
pylonspaste.aug23590644editdlrm
pythonpaste.aug20350644editdlrm
qpid.aug6700644editdlrm
quote.aug68710644editdlrm
rabbitmq.aug48040644editdlrm
radicale.aug15180644editdlrm
rancid.aug9270644editdlrm
redis.aug64390644editdlrm
reprepro_uploaders.aug56040644editdlrm
resolv.aug40820644editdlrm
rhsm.aug11300644editdlrm
rmt.aug7880644editdlrm
rsyncd.aug20170644editdlrm
rsyslog.aug33440644editdlrm
rtadvd.aug8540644editdlrm
rx.aug43030644editdlrm
samba.aug17550644editdlrm
schroot.aug18320644editdlrm
securetty.aug4500644editdlrm
semanage.aug8590644editdlrm
sep.aug13060644editdlrm
services.aug28870644editdlrm
shadow.aug24040644editdlrm
shells.aug7450644editdlrm
shellvars.aug123110644editdlrm
shellvars_list.aug17790644editdlrm
simplelines.aug11550644editdlrm
simplevars.aug14380644editdlrm
sip_conf.aug16510644editdlrm
slapd.aug53270644editdlrm
smbusers.aug7810644editdlrm
solaris_system.aug32280644editdlrm
soma.aug11670644editdlrm
spacevars.aug14490644editdlrm
splunk.aug16770644editdlrm
squid.aug163300644editdlrm
ssh.aug44930644editdlrm
sshd.aug42480644editdlrm
sssd.aug8610644editdlrm
star.aug9410644editdlrm
strongswan.aug16710644editdlrm
stunnel.aug22600644editdlrm
subversion.aug28170644editdlrm
sudoers.aug205570644editdlrm
sysconfig.aug25500644editdlrm
sysconfig_route.aug26150644editdlrm
sysctl.aug9230644editdlrm
syslog.aug75010644editdlrm
systemd.aug61540644editdlrm
termcap.aug10500644editdlrm
thttpd.aug13450644editdlrm
tinc.aug11030644editdlrm
tmpfiles.aug31570644editdlrm
toml.aug41750644editdlrm
trapperkeeper.aug41100644editdlrm
tuned.aug3870644editdlrm
up2date.aug22640644editdlrm
updatedb.aug11590644editdlrm
util.aug49630644editdlrm
vfstab.aug17560644editdlrm
vmware_config.aug7020644editdlrm
vsftpd.aug27850644editdlrm
webmin.aug12570644editdlrm
wine.aug19660644editdlrm
xendconfsxp.aug10970644editdlrm
xinetd.aug41200644editdlrm
xml.aug64810644editdlrm
xorg.aug106790644editdlrm
xymon.aug23140644editdlrm
xymon_alerting.aug62590644editdlrm
yaml.aug15810644editdlrm
yum.aug22400644editdlrm
Edit: /usr/share/augeas/lenses/dist/build.aug (17045B)
(* Module: Build Generic functions to build lenses Author: Raphael Pinson About: License This file is licensed under the LGPL v2+, like the rest of Augeas. About: Reference This file provides generic functions to build Augeas lenses *) module Build = let eol = Util.eol (************************************************************************ * Group: GENERIC CONSTRUCTIONS ************************************************************************) (************************************************************************ * View: brackets * Put a lens inside brackets * * Parameters: * l:lens - the left bracket lens * r: lens - the right bracket lens * lns:lens - the lens to put inside brackets ************************************************************************) let brackets (l:lens) (r:lens) (lns:lens) = l . lns . r (************************************************************************ * Group: LIST CONSTRUCTIONS ************************************************************************) (************************************************************************ * View: list * Build a list of identical lenses separated with a given separator * (at least 2 elements) * * Parameters: * lns:lens - the lens to repeat in the list * sep:lens - the separator lens, which can be taken from the module ************************************************************************) let list (lns:lens) (sep:lens) = lns . ( sep . lns )+ (************************************************************************ * View: opt_list * Same as , but there might be only one element in the list * * Parameters: * lns:lens - the lens to repeat in the list * sep:lens - the separator lens, which can be taken from the module ************************************************************************) let opt_list (lns:lens) (sep:lens) = lns . ( sep . lns )* (************************************************************************ * Group: LABEL OPERATIONS ************************************************************************) (************************************************************************ * View: xchg * Replace a pattern with a different label in the tree, * thus emulating a key but allowing to replace the keyword * with a different value than matched * * Parameters: * m:regexp - the pattern to match * d:string - the default value when a node in created * l:string - the label to apply for such nodes ************************************************************************) let xchg (m:regexp) (d:string) (l:string) = del m d . label l (************************************************************************ * View: xchgs * Same as , but the pattern is the default string * * Parameters: * m:string - the string to replace, also used as default * l:string - the label to apply for such nodes ************************************************************************) let xchgs (m:string) (l:string) = xchg m m l (************************************************************************ * Group: SUBNODE CONSTRUCTIONS ************************************************************************) (************************************************************************ * View: key_value_line * A subnode with a keyword, a separator and a storing lens, * and an end of line * * Parameters: * kw:regexp - the pattern to match as key * sep:lens - the separator lens, which can be taken from the module * sto:lens - the storing lens ************************************************************************) let key_value_line (kw:regexp) (sep:lens) (sto:lens) = [ key kw . sep . sto . eol ] (************************************************************************ * View: key_value_line_comment * Same as , but allows to have a comment in the end of a line * and an end of line * * Parameters: * kw:regexp - the pattern to match as key * sep:lens - the separator lens, which can be taken from the module * sto:lens - the storing lens * comment:lens - the comment lens, which can be taken from ************************************************************************) let key_value_line_comment (kw:regexp) (sep:lens) (sto:lens) (comment:lens) = [ key kw . sep . sto . (eol|comment) ] (************************************************************************ * View: key_value * Same as , but does not end with an end of line * * Parameters: * kw:regexp - the pattern to match as key * sep:lens - the separator lens, which can be taken from the module * sto:lens - the storing lens ************************************************************************) let key_value (kw: regexp) (sep:lens) (sto:lens) = [ key kw . sep . sto ] (************************************************************************ * View: key_ws_value * * Store a key/value pair where key and value are separated by whitespace * and the value goes to the end of the line. Leading and trailing * whitespace is stripped from the value. The end of line is consumed by * this lens * * Parameters: * kw:regexp - the pattern to match as key ************************************************************************) let key_ws_value (kw:regexp) = key_value_line kw Util.del_ws_spc (store Rx.space_in) (************************************************************************ * View: flag * A simple flag subnode, consisting of a single key * * Parameters: * kw:regexp - the pattern to match as key ************************************************************************) let flag (kw:regexp) = [ key kw ] (************************************************************************ * View: flag_line * A simple flag line, consisting of a single key * * Parameters: * kw:regexp - the pattern to match as key ************************************************************************) let flag_line (kw:regexp) = [ key kw . eol ] (************************************************************************ * Group: BLOCK CONSTRUCTIONS ************************************************************************) (************************************************************************ * View: block_generic * A block enclosed in brackets * * Parameters: * entry:lens - the entry to be stored inside the block. * This entry should include * or its equivalent if necessary. * entry_noindent:lens - the entry to be stored inside the block, * without indentation. * This entry should not include * entry_noeol:lens - the entry to be stored inside the block, * without eol. * This entry should not include * entry_noindent_noeol:lens - the entry to be stored inside the block, * without indentation or eol. * This entry should not include * comment:lens - the comment lens used in the block * comment_noindent:lens - the comment lens used in the block, * without indentation. * ldelim_re:regexp - regexp for the left delimiter * rdelim_re:regexp - regexp for the right delimiter * ldelim_default:string - default value for the left delimiter * rdelim_default:string - default value for the right delimiter ************************************************************************) let block_generic (entry:lens) (entry_noindent:lens) (entry_noeol:lens) (entry_noindent_noeol:lens) (comment:lens) (comment_noindent:lens) (ldelim_re:regexp) (rdelim_re:regexp) (ldelim_default:string) (rdelim_default:string) = let block_single = entry_noindent_noeol | comment_noindent in let block_start = entry_noindent | comment_noindent in let block_middle = (entry | comment)* in let block_end = entry_noeol | comment in del ldelim_re ldelim_default . ( ( block_start . block_middle . block_end ) | block_single ) . del rdelim_re rdelim_default (************************************************************************ * View: block_setdefault * A block enclosed in brackets * * Parameters: * entry:lens - the entry to be stored inside the block. * This entry should not include , * or , * should not be indented or finish with an eol. * ldelim_re:regexp - regexp for the left delimiter * rdelim_re:regexp - regexp for the left delimiter * ldelim_default:string - default value for the left delimiter * rdelim_default:string - default value for the right delimiter ************************************************************************) let block_setdelim (entry:lens) (ldelim_re:regexp) (rdelim_re:regexp) (ldelim_default:string) (rdelim_default:string) = block_generic (Util.empty | Util.indent . entry . eol) (entry . eol) (Util.indent . entry) entry Util.comment Util.comment_noindent ldelim_re rdelim_re ldelim_default rdelim_default (* Variable: block_ldelim_re *) let block_ldelim_re = /[ \t\n]+\{[ \t\n]*/ (* Variable: block_rdelim_re *) let block_rdelim_re = /[ \t\n]*\}/ (* Variable: block_ldelim_default *) let block_ldelim_default = " {\n" (* Variable: block_rdelim_default *) let block_rdelim_default = "}" (************************************************************************ * View: block * A block enclosed in brackets * * Parameters: * entry:lens - the entry to be stored inside the block. * This entry should not include , * or , * should not be indented or finish with an eol. ************************************************************************) let block (entry:lens) = block_setdelim entry block_ldelim_re block_rdelim_re block_ldelim_default block_rdelim_default (* Variable: block_ldelim_newlines_re *) let block_ldelim_newlines_re = /[ \t\n]*\{([ \t\n]*\n)?/ (* Variable: block_rdelim_newlines_re *) let block_rdelim_newlines_re = /[ \t]*\}/ (* Variable: block_ldelim_newlines_default *) let block_ldelim_newlines_default = "\n{\n" (* Variable: block_rdelim_newlines_default *) let block_rdelim_newlines_default = "}" (************************************************************************ * View: block_newline * A block enclosed in brackets, with newlines forced * and indentation defaulting to a tab. * * Parameters: * entry:lens - the entry to be stored inside the block. * This entry should not include , * or , * should be indented and finish with an eol. ************************************************************************) let block_newlines (entry:lens) (comment:lens) = del block_ldelim_newlines_re block_ldelim_newlines_default . ((entry | comment) . (Util.empty | entry | comment)*)? . del block_rdelim_newlines_re block_rdelim_newlines_default (************************************************************************ * View: block_newlines_spc * A block enclosed in brackets, with newlines forced * and indentation defaulting to a tab. The opening brace * must be preceded by whitespace * * Parameters: * entry:lens - the entry to be stored inside the block. * This entry should not include , * or , * should be indented and finish with an eol. ************************************************************************) let block_newlines_spc (entry:lens) (comment:lens) = del (/[ \t\n]/ . block_ldelim_newlines_re) block_ldelim_newlines_default . ((entry | comment) . (Util.empty | entry | comment)*)? . del block_rdelim_newlines_re block_rdelim_newlines_default (************************************************************************ * View: named_block * A named enclosed in brackets * * Parameters: * kw:regexp - the regexp for the block name * entry:lens - the entry to be stored inside the block * this entry should not include ************************************************************************) let named_block (kw:regexp) (entry:lens) = [ key kw . block entry . eol ] (************************************************************************ * Group: COMBINATORICS ************************************************************************) (************************************************************************ * View: combine_two_ord * Combine two lenses, ensuring first lens is first * * Parameters: * a:lens - the first lens * b:lens - the second lens ************************************************************************) let combine_two_ord (a:lens) (b:lens) = a . b (************************************************************************ * View: combine_two * Combine two lenses * * Parameters: * a:lens - the first lens * b:lens - the second lens ************************************************************************) let combine_two (a:lens) (b:lens) = combine_two_ord a b | combine_two_ord b a (************************************************************************ * View: combine_two_opt_ord * Combine two lenses optionally, ensuring first lens is first * (a, and optionally b) * * Parameters: * a:lens - the first lens * b:lens - the second lens ************************************************************************) let combine_two_opt_ord (a:lens) (b:lens) = a . b? (************************************************************************ * View: combine_two_opt * Combine two lenses optionally * (either a, b, or both, in any order) * * Parameters: * a:lens - the first lens * b:lens - the second lens ************************************************************************) let combine_two_opt (a:lens) (b:lens) = combine_two_opt_ord a b | combine_two_opt_ord b a (************************************************************************ * View: combine_three_ord * Combine three lenses, ensuring first lens is first * (a followed by either b, c, in any order) * * Parameters: * a:lens - the first lens * b:lens - the second lens * c:lens - the third lens ************************************************************************) let combine_three_ord (a:lens) (b:lens) (c:lens) = combine_two_ord a (combine_two b c) (************************************************************************ * View: combine_three * Combine three lenses * * Parameters: * a:lens - the first lens * b:lens - the second lens * c:lens - the third lens ************************************************************************) let combine_three (a:lens) (b:lens) (c:lens) = combine_three_ord a b c | combine_three_ord b a c | combine_three_ord c b a (************************************************************************ * View: combine_three_opt_ord * Combine three lenses optionally, ensuring first lens is first * (a followed by either b, c, or any of them, in any order) * * Parameters: * a:lens - the first lens * b:lens - the second lens * c:lens - the third lens ************************************************************************) let combine_three_opt_ord (a:lens) (b:lens) (c:lens) = combine_two_opt_ord a (combine_two_opt b c) (************************************************************************ * View: combine_three_opt * Combine three lenses optionally * (either a, b, c, or any of them, in any order) * * Parameters: * a:lens - the first lens * b:lens - the second lens * c:lens - the third lens ************************************************************************) let combine_three_opt (a:lens) (b:lens) (c:lens) = combine_three_opt_ord a b c | combine_three_opt_ord b a c | combine_three_opt_ord c b a