[pass] [PATCH] Follow symlinks in Zsh completion

Tom Vincent pass at tlvince.com
Thu Oct 31 17:04:28 CET 2013


If `PASSWORD_STORE_DIR:-$HOME/.password-store` is a symlink, Zsh throws:
`_values:compvalues:10: not enough arguments`.

Passing `-L` to find(1) fixes this.
---
 contrib/pass.zsh-completion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
index 848bc67..0bb14de 100644
--- a/contrib/pass.zsh-completion
+++ b/contrib/pass.zsh-completion
@@ -98,7 +98,7 @@ _pass_cmd_show () {
 _pass_complete_entries_helper () {
 	local IFS=$'\n'
 	local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
-	_values -C 'passwords' $(find "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort)
+	_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort)
 }
 
 _pass_complete_entries_with_subdirs () {
-- 
1.8.4.1



More information about the Password-Store mailing list