X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=adf64a0aebf3ae0a1654cd7312af4c70cbdb742d;hp=72a75a94abf96cb4bd77a67674123a8aa61016ef;hb=f3fc97c0008c1d48ccac88c52b5bae61460bfa3f;hpb=c5356b9ed56e42d36ca18206155b62c94cfbd79d diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 72a75a94..adf64a0a 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -287,8 +287,8 @@ _notmuch_insert() sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) ) return ;; - --try-decrypt) - COMPREPLY=( $( compgen -W "true false" -- "${cur}" ) ) + --decrypt) + COMPREPLY=( $( compgen -W "true false auto nostash" -- "${cur}" ) ) return ;; esac @@ -296,7 +296,7 @@ _notmuch_insert() ! $split && case "${cur}" in --*) - local options="--create-folder --folder= --keep --no-hooks --try-decrypt= ${_notmuch_shared_options}" + local options="--create-folder --folder= --keep --no-hooks --decrypt= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) return @@ -319,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 @@ -328,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}) ) ;; @@ -350,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}) ) ;; @@ -435,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}) ) ;; @@ -460,7 +472,7 @@ _notmuch_address() return ;; --output) - COMPREPLY=( $( compgen -W "sender recipients count" -- "${cur}" ) ) + COMPREPLY=( $( compgen -W "sender recipients count address" -- "${cur}" ) ) return ;; --sort) @@ -505,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 ;; @@ -514,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}) ) ;; @@ -595,7 +607,7 @@ _notmuch() esac elif [ "${arg}" = "help" ]; then # handle help command specially due to _notmuch_commands usage - local help_topics="$_notmuch_commands hooks search-terms" + local help_topics="$_notmuch_commands hooks search-terms properties" COMPREPLY=( $(compgen -W "${help_topics}" -- ${cur}) ) else # complete using _notmuch_subcommand if one exist