X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=notmuch.c;h=68a785e25bf0b826a17071bc8162edefe30fb87b;hb=82957c963296bb9d2147ce5374b940463facd9ec;hp=ac25ae189b78d049d65b70afc09e3dee031f4312;hpb=e7bb7919a2484e12cd5a672eaa21b695b7464acf;p=notmuch diff --git a/notmuch.c b/notmuch.c index ac25ae18..68a785e2 100644 --- a/notmuch.c +++ b/notmuch.c @@ -211,12 +211,14 @@ typedef struct help_topic { } help_topic_t; static const help_topic_t help_topics[] = { - { "search-terms", - "Common search term syntax." }, { "hooks", "Hooks that will be run before or after certain commands." }, { "properties", "Message property conventions and documentation." }, + { "search-terms", + "Common infix search term syntax." }, + { "sexp-queries", + "Common s-expression search term syntax." }, }; static const command_t * @@ -329,9 +331,7 @@ exec_man (const char *page) static int _help_for (const char *topic_name) { - const command_t *command; - const help_topic_t *topic; - unsigned int i; + char *page; if (! topic_name) { printf ("The notmuch mail system.\n\n"); @@ -348,23 +348,9 @@ _help_for (const char *topic_name) return EXIT_SUCCESS; } - command = find_command (topic_name); - if (command) { - char *page = talloc_asprintf (NULL, "notmuch-%s", command->name); - exec_man (page); - } - - for (i = 0; i < ARRAY_SIZE (help_topics); i++) { - topic = &help_topics[i]; - if (strcmp (topic_name, topic->name) == 0) { - char *page = talloc_asprintf (NULL, "notmuch-%s", topic->name); - exec_man (page); - } - } + page = talloc_asprintf (NULL, "notmuch-%s", topic_name); + exec_man (page); - fprintf (stderr, - "\nSorry, %s is not a known command. There's not much I can do to help.\n\n", - topic_name); return EXIT_FAILURE; }