fish: Improve output of guestfish -h cmd
[libguestfs.git] / src / generator.ml
index dd58a02..c5f21df 100644 (file)
@@ -4086,6 +4086,19 @@ partition table), C<gpt> (a GPT/EFI-style partition table).  Other
 values are possible, although unusual.  See C<guestfs_part_init>
 for a full list.");
 
+  ("fill", (RErr, [Int "c"; Int "len"; Pathname "path"]), 215, [],
+   [InitBasicFS, Always, TestOutputBuffer (
+      [["fill"; "0x63"; "10"; "/test"];
+       ["read_file"; "/test"]], "cccccccccc")],
+   "fill a file with octets",
+   "\
+This command creates a new file called C<path>.  The initial
+content of the file is C<len> octets of C<c>, where C<c>
+must be a number in the range C<[0..255]>.
+
+To fill a file with zero bytes (sparsely), it is
+much more efficient to use C<guestfs_truncate_size>.");
+
 ]
 
 let all_functions = non_daemon_functions @ daemon_functions
@@ -5088,6 +5101,7 @@ and generate_client_actions () =
 #include <inttypes.h>
 
 #include \"guestfs.h\"
+#include \"guestfs-internal.h\"
 #include \"guestfs-internal-actions.h\"
 #include \"guestfs_protocol.h\"
 
@@ -5845,6 +5859,7 @@ and generate_tests () =
 #include <fcntl.h>
 
 #include \"guestfs.h\"
+#include \"guestfs-internal.h\"
 
 static guestfs_h *g;
 static int suppress_error = 0;
@@ -6602,8 +6617,8 @@ and generate_fish_cmds () =
         match snd style with
         | [] -> name2
         | args ->
-            sprintf "%s <%s>"
-              name2 (String.concat "> <" (List.map name_of_argt args)) in
+            sprintf "%s %s"
+              name2 (String.concat " " (List.map name_of_argt args)) in
 
       let warnings =
         if List.mem ProtocolLimitWarning flags then
@@ -6640,7 +6655,9 @@ and generate_fish_cmds () =
       pr ")\n";
       pr "    pod2text (\"%s\", _(\"%s\"), %S);\n"
         name2 shortdesc
-        (" " ^ synopsis ^ "\n\n" ^ longdesc ^ warnings ^ describe_alias);
+        ("=head1 SYNOPSIS\n\n " ^ synopsis ^ "\n\n" ^
+        "=head1 DESCRIPTION\n\n" ^
+        longdesc ^ warnings ^ describe_alias);
       pr "  else\n"
   ) all_functions;
   pr "    display_builtin_command (cmd);\n";
@@ -9701,6 +9718,7 @@ and generate_bindtests () =
 #include <string.h>
 
 #include \"guestfs.h\"
+#include \"guestfs-internal.h\"
 #include \"guestfs-internal-actions.h\"
 #include \"guestfs_protocol.h\"