mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
cli: add support for notmuch command --help
Recognize 'notmuch command --help' at the top level as a special case, and show help for the command. Note that for simplicity, --help is only recognized as the first option for the subcommand.
This commit is contained in:
parent
c17e4fe629
commit
2447f4c119
1 changed files with 3 additions and 1 deletions
|
@ -314,7 +314,9 @@ main (int argc, char *argv[])
|
||||||
goto DONE;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print_help) {
|
/* Handle notmuch --help [command] and notmuch command --help. */
|
||||||
|
if (print_help ||
|
||||||
|
(opt_index + 1 < argc && strcmp (argv[opt_index + 1], "--help") == 0)) {
|
||||||
/*
|
/*
|
||||||
* Pass the first positional argument as argv[1] so the help
|
* Pass the first positional argument as argv[1] so the help
|
||||||
* command can give help for it. The help command ignores the
|
* command can give help for it. The help command ignores the
|
||||||
|
|
Loading…
Reference in a new issue