]> git.notmuchmail.org Git - notmuch/blobdiff - completion/notmuch-completion.bash
cli/new: add --try-decrypt=(true|false)
[notmuch] / completion / notmuch-completion.bash
index 5201be6378ddcce745d7734da5b0a2d57928a1ce..17be6b8f643d0fa05c129588b6e33617f1c8fa12 100644 (file)
@@ -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}) )
            ;;