zsh completion with PASSWORD_STORE_DIR doesn't work well
Stéphane Clérambault
stephane at clerambault.fr
Tue Jun 8 17:52:51 UTC 2021
Hello guys,
Thank you for maintaining this awesome tool !
I encountered a small problem about zsh completion with a custom
PASSWORD_STORE_DIR.
I wrote this function in my zshrc:
CUSTOM="$HOME/custom"
function rpass () {
PASSWORD_STORE_DIR=$CUSTOM pass $@
}
zstyle ':completion::complete:rpass::' prefix "$CUSTOM"
compdef _pass rpass
I don't know very well the zsh completion, so maybe I did something wrong. The
result is, completion works fine if I write `rpass <tab>` but if I write
`rpass
show <tab>` it shows the tree in ~/.password-store.
After a debugging session, I found the following line in _pass completion
file:
curcontext="${curcontext%:*:*}:pass-$cmd"
When I remove this line, it fixes the problem without any drawbacks (for now).
I didn't understand what exactly this line do but it seems related to my
problem.
Do you have any suggestions ?
Thank very much.
Sincerly
--
Stéphane Clérambault
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20210608/0e98af71/attachment.sig>
More information about the Password-Store
mailing list