diff options
author | David Bremner <david@tethera.net> | 2015-04-05 22:13:03 +0900 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2015-06-01 07:32:54 +0200 |
commit | 0018a8d787a98f80c665061daa9b0c73839d3666 (patch) | |
tree | c24386a37b845ae5f400bcb4bbb178c06af31b75 /notmuch-restore.c | |
parent | 0706e0e3e2da9abf0487ec91a505de82cf5e5c10 (diff) |
cli: define shared options, use for --help and --version
Unfortunately it seems trickier to support --config globally
The non-trivial changes are in notmuch.c; most of the other changes
consists of blindly inserting two lines into every subcommand.
Diffstat (limited to 'notmuch-restore.c')
-rw-r--r-- | notmuch-restore.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/notmuch-restore.c b/notmuch-restore.c index 584d9f96..2a534dc4 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -154,6 +154,7 @@ notmuch_restore_command (notmuch_config_t *config, int argc, char *argv[]) { 0, 0 } } }, { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 }, { NOTMUCH_OPT_BOOLEAN, &accumulate, "accumulate", 'a', 0 }, + { NOTMUCH_OPT_INHERIT, (void *) ¬much_shared_options, NULL, 0, 0 }, { 0, 0, 0, 0, 0 } }; @@ -163,6 +164,7 @@ notmuch_restore_command (notmuch_config_t *config, int argc, char *argv[]) goto DONE; } + notmuch_process_shared_options (argv[0]); name_for_error = input_file_name ? input_file_name : "stdin"; if (! accumulate) |