From: Richard Jones Date: Tue, 17 Nov 2009 20:00:17 +0000 (+0000) Subject: fish: Improve output of guestfish -h cmd X-Git-Tag: 1.0.79~6 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=3fc9951016d08e2467375e24094a468713637c1f;p=libguestfs.git fish: Improve output of guestfish -h cmd Display this output like a short manual page. Don't put <..> around the parameters to the command. --- diff --git a/fish/fish.c b/fish/fish.c index 3f534de..41c6cbf 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -457,7 +457,7 @@ pod2text (const char *name, const char *shortdesc, const char *str) printf ("%s - %s\n\n%s\n", name, shortdesc, str); return; } - fprintf (fp, "=head1 %s - %s\n\n", name, shortdesc); + fprintf (fp, "=head1 NAME\n\n%s - %s\n\n", name, shortdesc); fputs (str, fp); pclose (fp); } diff --git a/src/generator.ml b/src/generator.ml index 4499eb7..c5f21df 100644 --- a/src/generator.ml +++ b/src/generator.ml @@ -6617,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 @@ -6655,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";