X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=1356c4a40515ffb86ffd222ec8b13a723877a166;hp=960275d1f6727b139d2b2ccd680d95c982b4eec4;hb=cd4814ecb35c63152aced04fcb82e5facf1463ca;hpb=76f8498df61577c2f2e8f22e34a93a37ea532a03 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 960275d1..1356c4a4 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -27,6 +27,8 @@ # on completion. # +_notmuch_shared_options="--help --uuid= --version" + # $1: current input of the form prefix:partialinput, where prefix is # to or from. _notmuch_email() @@ -109,7 +111,7 @@ _notmuch_compact() ! $split && case "${cur}" in -*) - local options="--backup= --quiet" + local options="--backup= --quiet ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -162,7 +164,7 @@ _notmuch_count() ! $split && case "${cur}" in -*) - local options="--output= --exclude= --batch --input=" + local options="--output= --exclude= --batch --input= --lastmod ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -192,7 +194,7 @@ _notmuch_dump() ! $split && case "${cur}" in -*) - local options="--gzip --format= --output=" + local options="--gzip --format= --output= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -222,7 +224,7 @@ _notmuch_insert() ! $split && case "${cur}" in --*) - local options="--create-folder --folder= --keep --no-hooks" + local options="--create-folder --folder= --keep --no-hooks ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) return @@ -245,7 +247,8 @@ _notmuch_new() case "${cur}" in -*) - local options="--no-hooks --quiet" + local options="--no-hooks --quiet ${_notmuch_shared_options}" + compopt -o nospace COMPREPLY=( $(compgen -W "${options}" -- ${cur}) ) ;; esac @@ -271,7 +274,7 @@ _notmuch_reply() ! $split && case "${cur}" in -*) - local options="--format= --format-version= --reply-to= --decrypt" + local options="--format= --format-version= --reply-to= --decrypt ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -301,7 +304,7 @@ _notmuch_restore() ! $split && case "${cur}" in -*) - local options="--format= --accumulate --input=" + local options="--format= --accumulate --input= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -336,7 +339,7 @@ _notmuch_search() ! $split && case "${cur}" in -*) - local options="--format= --output= --sort= --offset= --limit= --exclude= --duplicate=" + local options="--format= --output= --sort= --offset= --limit= --exclude= --duplicate= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -369,12 +372,16 @@ _notmuch_address() COMPREPLY=( $( compgen -W "true false flag all" -- "${cur}" ) ) return ;; + --deduplicate) + COMPREPLY=( $( compgen -W "no mailbox address" -- "${cur}" ) ) + return + ;; esac ! $split && case "${cur}" in -*) - local options="--format= --output= --sort= --exclude=" + local options="--format= --output= --sort= --exclude= --deduplicate= ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) ;; @@ -408,7 +415,7 @@ _notmuch_show() ! $split && case "${cur}" in -*) - local options="--entire-thread= --format= --exclude= --body= --format-version= --part= --verify --decrypt --include-html" + 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}) ) ;; @@ -435,7 +442,7 @@ _notmuch_tag() ! $split && case "${cur}" in --*) - local options="--batch --input= --remove-all" + local options="--batch --input= --remove-all ${_notmuch_shared_options}" compopt -o nospace COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) return