Improve usability and/or readibility of help and apropos output.

The "help" command can output long list of command names or classes.
Use the title style to style the command names or classes to make
the output more readable.

Similarly, change "apropos" command to also style the command names.

It is sometimes unclear why "apropos REGEXP" lists some commands,
and then the user has to manually do 'help command' for all commands
listed by "apropos" to see more details about the matching commands.

=> Add an optional flag -v so that "apropos -v REGEXP":
  * outputs the full documentation of matching commands.
  * highlights the documentation parts matching REGEXP.
This commit is contained in:
Philippe Waroquiers
2019-05-31 14:00:47 +02:00
parent 9303eb2fb1
commit 66d8c86285
4 changed files with 69 additions and 22 deletions

View File

@@ -249,7 +249,7 @@ extern void help_cmd_list (struct cmd_list_element *, enum command_class,
extern void help_cmd (const char *, struct ui_file *);
extern void apropos_cmd (struct ui_file *, struct cmd_list_element *,
compiled_regex &, const char *);
bool verbose, compiled_regex &, const char *);
/* Used to mark commands that don't do anything. If we just leave the
function field NULL, the command is interpreted as a help topic, or