[augeas-devel] Comments with double quotes

Mathieu Bornoz mathieu.bornoz at camptocamp.com
Thu Oct 8 07:00:09 UTC 2009


Here's an example with the lens xinetd.

If I add some content between double quotes in test/test_xinetd.aug :

mbornoz at kazbek:~/augeas/lenses$ git diff tests/test_xinetd.aug
diff --git a/lenses/tests/test_xinetd.aug b/lenses/tests/test_xinetd.aug
index c49496b..ae69d58 100644
--- a/lenses/tests/test_xinetd.aug
+++ b/lenses/tests/test_xinetd.aug
@@ -5,7 +5,7 @@ let eol_ws = "defaults \t \n{\n  enabled = cvs echo
\n}\n\n"
 let cvs = "# default: off
 # description: The CVS service can record the history of your source
 #              files. CVS stores all the versions of a file in a single
-#              file in a clever way that only stores the differences
+#              file in a "clever way" that only stores the differences
 #              between versions.
 service cvspserver
 {

and I run augparse :

mbornoz at kazbek:~/augeas/lenses$ augparse -I. tests/test_xinetd.aug
tests/test_xinetd.aug:8.0-.6:Undefined variable clever
tests/test_xinetd.aug:8.7-.10:Undefined variable way
tests/test_xinetd.aug:42.20-.23:Undefined variable cvs
tests/test_xinetd.aug: error: Loading failed

I am trying to write my first lens with augeas then maybe I doing
something wrong.

Mathieu


>> I'm trying to do a lens for the file postgresql.conf 	
>> and I see a problem with the comments of the following form :
>>
>> # (The "=" is optional.)  Whitespace may be used.
>>
>> I use "util.comment" but this regex does not manage double quotes :(
> 
> I don't understand what you mean with 'does not manage double quotes' -
> comments with quotes in them are definitely accepted and mapped to the
> tree.





More information about the augeas-devel mailing list