fish: Improve output of guestfish -h cmd

Display this output like a short manual page.

Don't put <..> around the parameters to the command.
This commit is contained in:
Richard Jones
2009-11-17 20:00:17 +00:00
parent 540c85a110
commit 3fc9951016
2 changed files with 6 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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";