diff options
| author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-12-04 13:43:10 -0500 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-12-07 08:20:00 -0400 |
| commit | de80ede3dfa88d50a3a4d34cedfcd71b8bde165b (patch) | |
| tree | 806c35499b3f214d1270a9e44a095195b8ce65fc /notmuch.c | |
| parent | 03f4f75124c6d9882b8306873e8908aac9eee2bb (diff) | |
cli/help: give a hint about notmuch-emacs-mua
"notmuch help" doesn't mention "notmuch-emacs-mua" even though we
support it through the try_external_command() mechanism.
In addition, "notmuch help emacs-mua" doesn't work, even though we
ship the appropriate manpage.
This changeset fixes both of these problems.
Diffstat (limited to 'notmuch.c')
| -rw-r--r-- | notmuch.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -167,6 +167,10 @@ static command_t commands[] = { "Re-index all messages matching the search terms." }, { "config", notmuch_config_command, NOTMUCH_CONFIG_OPEN, "Get or set settings in the notmuch configuration file." }, +#if WITH_EMACS + { "emacs-mua", NULL, 0, + "send mail with notmuch and emacs." }, +#endif { "help", notmuch_help_command, NOTMUCH_CONFIG_CREATE, /* create but don't save config */ "This message, or more detailed help for the named command." } }; @@ -480,7 +484,8 @@ main (int argc, char *argv[]) notmuch_process_shared_options (command_name); command = find_command (command_name); - if (!command) { + /* if command->function is NULL, try external command */ + if (!command || !command->function) { /* This won't return if the external command is found. */ if (try_external_command(argv + opt_index)) fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n", |
