aboutsummaryrefslogtreecommitdiff
path: root/completion
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2017-10-20 22:25:48 -0400
committerDavid Bremner <david@tethera.net>2017-10-21 19:58:52 -0300
commit81168917447a582aee186fc0edc09f5277ce565d (patch)
tree429ddec5b9f6e0a4928e47d4a657407f5954c559 /completion
parentc5356b9ed56e42d36ca18206155b62c94cfbd79d (diff)
cli/reindex: add --try-decrypt=(true|false)
Enable override of the index.try_decrypt setting on a per-run basis when invoking "notmuch reindex". This allows the possibility of (for example) an emacs keybinding that adds the cleartext of the currently shown decrypted message to the index, making it searchable in the future. It also enables one-time indexing of all messages matching some query, like so: notmuch reindex tag:encrypted and\ not property:index.decryption=success and\ from:alice@example.org We also update the documentation and tab completion, and add a few more tests.
Diffstat (limited to 'completion')
-rw-r--r--completion/notmuch-completion.bash10
1 files changed, 9 insertions, 1 deletions
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index 72a75a94..7aae4297 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -435,10 +435,18 @@ _notmuch_reindex()
local cur prev words cword split
_init_completion -s || return
+ $split &&
+ case "${prev}" in
+ --try-decrypt)
+ COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) )
+ return
+ ;;
+ esac
+
! $split &&
case "${cur}" in
-*)
- local options="${_notmuch_shared_options}"
+ local options="--try-decrypt= ${_notmuch_shared_options}"
compopt -o nospace
COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
;;