commit 5cee8f15fdfca2a4ac0bb7e6fdafc73a5c1d9c4c parent d23f0cc3e8f18b37b428b1235574ff95380ab666 Author: Anders Damsgaard <andersd@riseup.net> Date: Mon, 18 Dec 2017 12:40:57 -0500 Autocomplete `pass **<Tab>` Diffstat:
M | links/.zshrc | | | 13 | +++++++++++++ |
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/links/.zshrc b/links/.zshrc @@ -211,6 +211,19 @@ alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' +#### AUTOCOMPLETE + +# pass **<tab> +_fzf_complete_pass() { + _fzf_complete '+m' "$@" < <( + pwdir=${PASSWORD_STORE_DIR-~/.password-store/} + stringsize="${#pwdir}" + find "$pwdir" -name "*.gpg" -print | + cut -c "$((stringsize + 1))"- | + sed -e 's/\(.*\)\.gpg/\1/' + ) +} + #### PATH AND MACHINE SPECIFIC CONFIGS [ -d /usr/local/bin ] && export PATH=/usr/local/bin:$PATH