mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-03 15:21:41 +01:00
notmuch: Add support for a --help option.
Previously, only "notmuch help" worked while a call to "notmuch --help" would just print a message telling the user to call "notmuch help". Instead of the redirection, just support --help directly now.
This commit is contained in:
parent
f689c83af4
commit
9d9aeb7c71
1 changed files with 6 additions and 1 deletions
|
@ -307,7 +307,9 @@ usage (FILE *out)
|
|||
command_t *command;
|
||||
unsigned int i;
|
||||
|
||||
fprintf (out, "Usage: notmuch <command> [args...]\n");
|
||||
fprintf (out,
|
||||
"Usage: notmuch --help\n"
|
||||
" notmuch <command> [args...]\n");
|
||||
fprintf (out, "\n");
|
||||
fprintf (out, "Where <command> and [args...] are as follows:\n");
|
||||
fprintf (out, "\n");
|
||||
|
@ -457,6 +459,9 @@ main (int argc, char *argv[])
|
|||
if (argc == 1)
|
||||
return notmuch (local);
|
||||
|
||||
if (STRNCMP_LITERAL (argv[1], "--help") == 0)
|
||||
return notmuch_help_command (NULL, 0, NULL);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (commands); i++) {
|
||||
command = &commands[i];
|
||||
|
||||
|
|
Loading…
Reference in a new issue