diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-12-25 14:42:26 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2017-12-29 16:45:35 -0400 |
commit | 0ada2a05c94de72bc2c7c57a790e92b77af37a42 (patch) | |
tree | 3eecbe5d2807be6fb01cb4e2b8b565f40fe050e6 /command-line-arguments.h | |
parent | 07a6214233ebc1a9c228acae674cffe68d0908ea (diff) |
cli: some keyword options can be supplied with no argument
We might change some notmuch command line tools that used to be
booleans into keyword arguments.
In that case, there are some legacy tools that will expect to be able
to do "notmuch foo --bar" instead of "notmuch foo --bar=baz".
This patch makes it possible to support that older API, while
providing a warning and an encouragement to upgrade.
Diffstat (limited to 'command-line-arguments.h')
-rw-r--r-- | command-line-arguments.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/command-line-arguments.h b/command-line-arguments.h index c0228f7c..f722f97d 100644 --- a/command-line-arguments.h +++ b/command-line-arguments.h @@ -26,6 +26,10 @@ typedef struct notmuch_opt_desc { const char **opt_string; const char **opt_position; + /* for opt_keyword only: if no matching arguments were found, and + * keyword_no_arg_value is set, then use keyword_no_arg_value instead. */ + const char *keyword_no_arg_value; + /* Must be set except for opt_inherit and opt_position. */ const char *name; |