]> git.notmuchmail.org Git - notmuch/blobdiff - completion/zsh/_email-notmuch
completion: more complete completion for zsh.
[notmuch] / completion / zsh / _email-notmuch
diff --git a/completion/zsh/_email-notmuch b/completion/zsh/_email-notmuch
new file mode 100644 (file)
index 0000000..1cd0d78
--- /dev/null
@@ -0,0 +1,9 @@
+#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