X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=948c153be4b3eeb56db38cdb9420a8f6c025add0;hp=17be6b8f643d0fa05c129588b6e33617f1c8fa12;hb=fccebbaeef1e4b6489425afb13f419543d53d285;hpb=35456d4b0c89c3fa648fb6a879c5d275e04ff1c2 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 17be6b8f..948c153b 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -287,12 +287,16 @@ _notmuch_insert() sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) ) return ;; + --decrypt) + COMPREPLY=( $( compgen -W "true false auto nostash" -- "${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 --decrypt= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) return @@ -315,8 +319,8 @@ _notmuch_new() $split && case "${prev}" in - --try-decrypt) - COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) ) + --decrypt) + COMPREPLY=( $( compgen -W "true false auto nostash" -- "${cur}" ) ) return ;; esac @@ -324,7 +328,7 @@ _notmuch_new() ! $split && case "${cur}" in -*) - local options="--no-hooks --try-decrypt= --quiet ${_notmuch_shared_options}" + local options="--no-hooks --decrypt= --quiet ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "${options}" -- ${cur}) ) ;; @@ -346,12 +350,16 @@ _notmuch_reply() COMPREPLY=( $( compgen -W "all sender" -- "${cur}" ) ) return ;; + --decrypt) + COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) ) + return + ;; esac ! $split && case "${cur}" in -*) - local options="--format= --format-version= --reply-to= --decrypt ${_notmuch_shared_options}" + local options="--format= --format-version= --reply-to= --decrypt= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -431,10 +439,18 @@ _notmuch_reindex() local cur prev words cword split _init_completion -s || return + $split && + case "${prev}" in + --decrypt) + COMPREPLY=( $( compgen -W "true false auto nostash" -- "${cur}" ) ) + return + ;; + esac + ! $split && case "${cur}" in -*) - local options="${_notmuch_shared_options}" + local options="--decrypt= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -501,7 +517,7 @@ _notmuch_show() COMPREPLY=( $( compgen -W "text json sexp mbox raw" -- "${cur}" ) ) return ;; - --exclude|--body) + --exclude|--body|--decrypt) COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) ) return ;; @@ -510,7 +526,7 @@ _notmuch_show() ! $split && case "${cur}" in -*) - local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt --include-html ${_notmuch_shared_options}" + local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt= --include-html ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;;