diff options
| author | Jani Nikula <jani@nikula.org> | 2017-10-14 16:15:43 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-11-08 09:46:44 -0500 |
| commit | 733ccfabca350f65a1d0ba1f64792a8a436da273 (patch) | |
| tree | 602a83e0831b1ccd19d1a25c97fd34576481b7da /notmuch-insert.c | |
| parent | 7ac96b149f5a0e5c03b64856d7c20789dab3c628 (diff) | |
cli: allow empty strings for notmuch insert --folder argument
Now that it's easy to add argument specific modifiers in opt
descriptions, add a new .allow_empty field to allow empty strings for
individual string arguments while retaining strict checks
elsewhere. Use this for notmuch insert --folder, where the empty
string means top level folder.
Diffstat (limited to 'notmuch-insert.c')
| -rw-r--r-- | notmuch-insert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/notmuch-insert.c b/notmuch-insert.c index 4d6b0a7f..bb835ba9 100644 --- a/notmuch-insert.c +++ b/notmuch-insert.c @@ -464,7 +464,7 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]) unsigned int i; notmuch_opt_desc_t options[] = { - { .opt_string = &folder, .name = "folder" }, + { .opt_string = &folder, .name = "folder", .allow_empty = true }, { .opt_bool = &create_folder, .name = "create-folder" }, { .opt_bool = &keep, .name = "keep" }, { .opt_bool = &no_hooks, .name = "no-hooks" }, |
