X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=5201be6378ddcce745d7734da5b0a2d57928a1ce;hb=dea75b5dd641219047382ef7de48905f4a506039;hp=7cad047f8499b083640c8a968551c09e9246c094;hpb=508b5c20fa38b17fa527af075857061f4ed81e2a;p=notmuch diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 7cad047f..5201be63 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -240,6 +240,38 @@ _notmuch_dump() esac } +_notmuch_emacs_mua() +{ + local cur prev words cword split + _init_completion -s || return + + $split && + case "${prev}" in + --to|--cc|--bcc) + COMPREPLY=( $(compgen -W "`_notmuch_email to:${cur}`" -- ${cur}) ) + return + ;; + --body) + _filedir + return + ;; + esac + + ! $split && + case "${cur}" in + -*) + local options="--subject= --to= --cc= --bcc= --body= --no-window-system --client --auto-daemon --create-frame --print --help --hello" + + compopt -o nospace + COMPREPLY=( $(compgen -W "$options" -- ${cur}) ) + ;; + *) + COMPREPLY=( $(compgen -W "`_notmuch_email to:${cur}`" -- ${cur}) ) + return + ;; + esac +} + _notmuch_insert() { local cur prev words cword split @@ -385,6 +417,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 @@ -500,7 +550,7 @@ _notmuch_tag() _notmuch() { - local _notmuch_commands="compact config count dump help insert new reply restore search address setup show tag" + 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