diff options
| author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-10-20 22:25:46 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-10-21 19:58:32 -0300 |
| commit | 35456d4b0c89c3fa648fb6a879c5d275e04ff1c2 (patch) | |
| tree | 428fe3d6976b2a56f8a79318f5aa6d15a01106cd /completion/notmuch-completion.bash | |
| parent | 92f318abe40c7e0ef449559728b3a6d160bd9325 (diff) | |
cli/new: add --try-decrypt=(true|false)
Enable override of the index.try_decrypt setting during "notmuch new"
on a per-invocation basis.
We update the documentation and tab completion, and also add a test.
Diffstat (limited to 'completion/notmuch-completion.bash')
| -rw-r--r-- | completion/notmuch-completion.bash | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 5201be63..17be6b8f 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -311,11 +311,20 @@ _notmuch_insert() _notmuch_new() { local cur prev words cword split - _init_completion || return + _init_completion -s || return + + $split && + case "${prev}" in + --try-decrypt) + COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) ) + return + ;; + esac + ! $split && case "${cur}" in -*) - local options="--no-hooks --quiet ${_notmuch_shared_options}" + local options="--no-hooks --try-decrypt= --quiet ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "${options}" -- ${cur}) ) ;; |
