mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-02-26 20:02:24 +01:00
cli: fix notmuch top level argument parsing
Use strcmp instead of STRNCMP_LITERAL, which matches the prefix instead of the whole argument.
This commit is contained in:
parent
fb6edb0800
commit
8ce50f300f
1 changed files with 2 additions and 2 deletions
|
@ -245,10 +245,10 @@ main (int argc, char *argv[])
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
return notmuch (local);
|
return notmuch (local);
|
||||||
|
|
||||||
if (STRNCMP_LITERAL (argv[1], "--help") == 0)
|
if (strcmp (argv[1], "--help") == 0)
|
||||||
return notmuch_help_command (NULL, argc - 1, &argv[1]);
|
return notmuch_help_command (NULL, argc - 1, &argv[1]);
|
||||||
|
|
||||||
if (STRNCMP_LITERAL (argv[1], "--version") == 0) {
|
if (strcmp (argv[1], "--version") == 0) {
|
||||||
printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n");
|
printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue