From 11399da5fa9a85c74dbc47db5613fc13cebdb3b7 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 21 Feb 2021 19:18:14 -0800 Subject: [PATCH] docs: Update to add LIST --sexp. --- doc/pwmd.html | 16 ++++++++++++++-- src/commands.c | 14 +++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/doc/pwmd.html b/doc/pwmd.html index bba9e62c..261d797d 100644 --- a/doc/pwmd.html +++ b/doc/pwmd.html @@ -1225,7 +1225,7 @@ Next: , Previous:

Syntax:

-
LIST [--inquire] [--recurse] [element[<TAB>child[..]]]
+
LIST [--inquire] [--recurse] [--sexp] [element[<TAB>child[..]]]
 

If no element path is given then a newline separated list of root elements @@ -1254,7 +1254,19 @@ same error flag. The option --recurse may be used to list the entire element tree for a specified element path or the entire tree for all root elements.

-When the --inquire option is passed then all remaining non-option +The option --sexp outputs the list in an s-expression and also +appends an elements’ attributes and attribute values. The syntax is: +

+
+
(11:list-result
+  (4:path N:<path> 5:flags N:<flags>
+    (5:attrs N:<name> N:<value> ...)
+  )
+  ...
+)
+
+ +

When the --inquire option is passed then all remaining non-option arguments are retrieved via a server INQUIRE.

diff --git a/src/commands.c b/src/commands.c index e46213eb..21370ca4 100644 --- a/src/commands.c +++ b/src/commands.c @@ -5463,7 +5463,7 @@ init_commands () )); new_command("LIST", 0, 0, 1, 0, list_command, _( -"LIST [--inquire] [--recurse] [element[child[..]]]\n" /* Showing document elements. */ +"LIST [--inquire] [--recurse] [--sexp] [element[child[..]]]\n" /* Showing document elements. */ "If no element path is given then a newline separated list of root elements " "is returned with a data response. If given, then children of the specified " "element path are returned." @@ -5490,6 +5490,18 @@ init_commands () "The option @option{--recurse} may be used to list the entire element tree " "for a specified element path or the entire tree for all root elements." "@*@*" +"The option @option{--sexp} outputs the list in an s-expression and also " +"appends an elements' attributes and attribute values. The syntax is:\n" +"\n" +"@example\n" +"(11:list-result\n" +" (4:path N: 5:flags N:\n" +" (5:attrs N: N: ...)\n" +" )\n" +" ...\n" +")\n" +"@end example\n" +"\n" "When the @option{--inquire} option is passed then all remaining non-option " "arguments are retrieved via a server @emph{INQUIRE}." )); -- 2.11.4.GIT