[augeas-devel] augeas: master - * src/augtool.c: make second argument for 'set' optional

David Lutterkort lutter at fedoraproject.org
Wed Mar 25 18:34:17 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=7cb4e6bbffaf082fe90c394813c5bedaf826c05f
Commit:        7cb4e6bbffaf082fe90c394813c5bedaf826c05f
Parent:        62dbd8c7bd0511b32fe26317731aaa8a5c8b2fb7
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Wed Mar 25 09:31:52 2009 -0700
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Wed Mar 25 09:38:57 2009 -0700

* src/augtool.c: make second argument for 'set' optional

This makes it possible to set a tree node's value to the empty string
with
  set /foo ""
and
  set /foo
---
 src/augtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/augtool.c b/src/augtool.c
index c4e90af..0869960 100644
--- a/src/augtool.c
+++ b/src/augtool.c
@@ -391,7 +391,7 @@ static const struct command const commands[] = {
       "        exist yet. If DST exists already, it and all its descendants are\n"
       "        deleted. If DST does not exist yet, it and all its missing \n"
       "        ancestors are created." },
-    { "set", 2, 2, cmd_set, "set <PATH> <VALUE>",
+    { "set", 1, 2, cmd_set, "set <PATH> <VALUE>",
       "Associate VALUE with PATH. If PATH is not in the tree yet,\n"
       "        it and all its ancestors will be created. These new tree entries\n"
       "        will appear last amongst their siblings"




More information about the augeas-devel mailing list