notmuch/completion/zsh/_email-notmuch
Vincent Breitmoser 07eac4af32 completion: more complete completion for zsh.
This adds completion files for zsh that cover most of notmuch's cli.

The files in completion/zsh are formatted so that they can be found by
zsh's completion system if put $fpath. They are also registered to the
notmuch-* pattern, so they can be called externally using _dispatch.

Update installation recipe and drop debian/notmuch.examples to avoid
breakage. This means zsh completion is not installed for debian, to be
fixed in a future commit.

Amended by db: use regexp searching for address completion. This seems
to be fast enough to work without a cache.
2018-10-02 21:04:26 -03:00

9 lines
239 B
Text

#autoload
local expl
local -a notmuch_addr
notmuch_addr=( ${(f)"$(notmuch address --deduplicate=address --output=address -- from:/$PREFIX/)"} )
_description notmuch-addr expl 'email address (notmuch)'
compadd "$expl[@]" -a notmuch_addr