[PATCH] Add zsh completion for extensions

Alexandre Pujol alexandre at pujol.io
Sun Dec 9 20:42:56 CET 2018


Hi all,

This patch adds the support of the extension for the zsh completion.

It is inspired by the way the git addons completion works [1]. Therefore; it
shares the same format. If you have your own pass extension, you can make that
command known to the completion creating a function _pass-foo() to handle
specific completion for that command. Place such a function inside an
autoloaded #compdef file, and you should be all set. You can add a description
to such a function by adding a line matching:

     #description DESCRIPTION

as the second line in the file.

There are two examples of extension using this patch with pass-tomb [2] and
pass-update [3].

[1] https://github.com/zsh-users/zsh/blob/cb26725d40a9104ee08e3ca6ff9661890eca8a65/Completion/Unix/Command/_git
[2] https://github.com/roddhjav/pass-tomb/blob/master/completion/pass-tomb.zsh
[3] https://github.com/roddhjav/pass-update/blob/master/completion/pass-update.zsh

Regards,
Alex



More information about the Password-Store mailing list