pass choose
Greg Minshall
minshall at acm.org
Mon Jun 4 04:30:06 CEST 2018
hi. i put the following very small patch together for
pass.bash-completion. it allows one to specify an environmental
variable PASSWORD_COMPLETE_ENTRIES, which is shell code that is "eval"d.
the default is (we hope) the current behavior. but, i, e.g., have in my
.bashrc, the following:
----
export PASSWORD_COMPLETE_ENTRIES='(([[ -n ${COMPREPLY[@]} ]] && echo ${COMPREPLY[@]} | tr " " "\n";
(cd $prefix; find . -name "${cur}*.gpg" -type f |
sed "sX./XX" |
sed "s/[.]gpg//" )
) 2>&1 | dmenu -b)'
----
which allows me to do completion via dmenu(1). possibly this would
satisfy the "choose".
i barely know bash, so can't comment on how this would fit with fish,
zsh completion.
the only thing i'm a bit worried about is zeroing out "COMPREPLY" --
necessary for the code to work -- at the point i do. it *seems* as if
"items" should contain everything one would want to have in "COMPREPLY".
cheers, Greg
----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PASSWORD_COMPLETE_ENTRIES-programmable-programmable.patch
Type: text/x-diff
Size: 1036 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20180603/50b9fc5c/attachment.patch>
More information about the Password-Store
mailing list