X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=17be6b8f643d0fa05c129588b6e33617f1c8fa12;hb=35456d4b0c89c3fa648fb6a879c5d275e04ff1c2;hp=e4e4b36bccf723ead969dd8c48bb01cccfc96682;hpb=a34f30888e7874fba2032a066a7babce1dd3f69f;p=notmuch diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index e4e4b36b..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}) ) ;; @@ -417,6 +426,24 @@ _notmuch_search() esac } +_notmuch_reindex() +{ + local cur prev words cword split + _init_completion -s || return + + ! $split && + case "${cur}" in + -*) + local options="${_notmuch_shared_options}" + compopt -o nospace + COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) + ;; + *) + _notmuch_search_terms + ;; + esac +} + _notmuch_address() { local cur prev words cword split @@ -532,7 +559,7 @@ _notmuch_tag() _notmuch() { - local _notmuch_commands="compact config count dump help insert new reply restore search address setup show tag emacs-mua" + local _notmuch_commands="compact config count dump help insert new reply restore reindex search address setup show tag emacs-mua" local arg cur prev words cword split # require bash-completion with _init_completion