diff options
| author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2017-08-09 03:14:41 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-08-18 19:50:21 -0300 |
| commit | dea75b5dd641219047382ef7de48905f4a506039 (patch) | |
| tree | a97989186e3c803d1d79f565bdd32e204baa5b02 /completion | |
| parent | 0155411e05925799a383b71bb11fab32c803d199 (diff) | |
completion: add bash completion for "notmuch reindex"
The main thing that notmuch reindex does is to use search terms, so we
can reuse a bunch of the existing completion framework.
Diffstat (limited to 'completion')
| -rw-r--r-- | completion/notmuch-completion.bash | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index e4e4b36b..5201be63 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -417,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 @@ -532,7 +550,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 |
