[augeas-devel] [PATCH] Change default indentation and separation to match the example configuration file shipped by the upstream authors
Free Ekanayaka
free at 64studio.com
Mon Oct 6 07:09:41 UTC 2008
# HG changeset patch
# User Free Ekanayaka <free at 64studio.com>
# Date 1223276896 -7200
# Node ID fdc276b628a5417a0759544b51934ba3994a0661
# Parent 226a302a9ac65304dbe0a7e55c1238f29a5ffc2f
Change default indentation and separation to match the example configuration file shipped by the upstream authors
diff -r 226a302a9ac6 -r fdc276b628a5 lenses/samba.aug
--- a/lenses/samba.aug Sat Oct 04 00:05:47 2008 +0200
+++ b/lenses/samba.aug Mon Oct 06 09:08:16 2008 +0200
@@ -14,14 +14,15 @@ module Samba =
*************************************************************************)
let comment = IniFile.comment IniFile.comment_re IniFile.comment_default
-let sep = IniFile.sep IniFile.sep_re IniFile.sep_default
-
+let sep = del /[ \t]*[=:]/ " ="
+let indent = del /[ \t]*/ " "
(* Import useful INI File primitives *)
let eol = IniFile.eol
let empty = IniFile.empty
-let sto_to_comment
- = IniFile.sto_to_comment
+let sto_to_comment
+ = Util.del_opt_ws " "
+ . store /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/
(************************************************************************
* ENTRY
@@ -30,7 +31,7 @@ let sto_to_comment
let entry_re = /[A-Za-z0-9_.-][A-Za-z0-9 _.-]*[A-Za-z0-9_.-]/
let entry = let kw = entry_re in
- [ Util.indent
+ [ indent
. key kw
. sep
. sto_to_comment?
More information about the augeas-devel
mailing list