commit bdc0960d68d2ab6e4f078356092f97ccae15f0b4
parent 3955cb4678948013fc7e871574f7eef7cc556c99
Author: Brian Mattern <rephorm@rephorm.com>
Date: Thu, 13 Sep 2012 07:59:58 +0200
Skip directories in zsh completion
this allows the full entry to be completed with a single tab if there is
only one entry in a folder
e.g., given:
amazon.com
user at domain.com
google.com
user1
user2
`pass am<tab>` -> `pass amazon.com/user at domain.com`
while
`pass goo<tab>` -> `pass google.com/`
(previously, the amazon completion would have stopped at amazon.com
despite only a single entry existing)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/pass.zsh-completion b/contrib/pass.zsh-completion
@@ -69,5 +69,5 @@ _pass_cmd_rm () {
}
_get_stored_pwd () {
- compadd `find ~/.password-store \( -name .git -o -name .gpg-id \) -prune -o -print | sed 's#.*\.password-store*.##'| sed 's#\.gpg##' | sort`
+ compadd `find ~/.password-store \( -name .git -o -name .gpg-id \) -prune -o -type f -print | sed 's#.*\.password-store*.##'| sed 's#\.gpg##' | sort`
}