]> git.notmuchmail.org Git - notmuch/blobdiff - completion/notmuch-completion.bash
cli/insert: add --try-decrypt=(true|false)
[notmuch] / completion / notmuch-completion.bash
index 5201be6378ddcce745d7734da5b0a2d57928a1ce..72a75a94abf96cb4bd77a67674123a8aa61016ef 100644 (file)
@@ -287,12 +287,16 @@ _notmuch_insert()
                sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
            return
            ;;
+       --try-decrypt)
+           COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) )
+           return
+           ;;
     esac
 
     ! $split &&
     case "${cur}" in
        --*)
-           local options="--create-folder --folder= --keep --no-hooks ${_notmuch_shared_options}"
+           local options="--create-folder --folder= --keep --no-hooks --try-decrypt= ${_notmuch_shared_options}"
            compopt -o nospace
            COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
            return
@@ -311,11 +315,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}) )
            ;;