[augeas-devel] [PATCH 1/2] Add doc about square lens
Francis Giraldeau
francis.giraldeau at gmail.com
Tue Feb 22 04:08:44 UTC 2011
---
pages/docs/lenses.txt | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/pages/docs/lenses.txt b/pages/docs/lenses.txt
index fb4d1bf..4ade465 100644
--- a/pages/docs/lenses.txt
+++ b/pages/docs/lenses.txt
@@ -64,8 +64,8 @@ Lens primitives
----------------
The following lens primitives are built into Augeas; the arguments to them
-are either regular expressions, indicated by ``RE`` or strings indicated by
-``STR``.
+are either regular expressions, indicated by ``RE``, strings indicated by
+``STR`` or another lens, indicated by ``LENS``.
``del RE STR``
Match the regular expression ``RE`` in the *get* direction. The result
@@ -90,6 +90,12 @@ are either regular expressions, indicated by ``RE`` or strings indicated by
subtree.
``label STR``
Use the string ``STR`` as the label of the enclosing subtree.
+``square RE LENS``
+ Match the concatenation of ``RE . LENS . RE`` in the *get* direction. The
+ first ``RE`` is used as the label of the enclosing subtree, while the ending
+ ``RE`` doesn't appear in the tree. In the *put* direction, the node's label
+ is copied to both sides of ``LENS``. This lens generates palindrome strings
+ and is intended for tag based configurations like XML.
Lens combinators
----------------
--
1.7.1
More information about the augeas-devel
mailing list