[pass] [PATCH] Don't require trailing slash in PASSWORD_STORE_DIR

Florian Margaine florian at margaine.com
Tue Oct 25 17:40:47 CEST 2016


This requirement leads to non-working bash completion in many cases,
with a lot of head-scratching.

Always adding the trailing slash means that sometimes there will be
double slashes, which is not harmful in any way.
---
 src/completion/pass.bash-completion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/completion/pass.bash-completion
b/src/completion/pass.bash-completion index 456485b..24d49e9 100644
--- a/src/completion/pass.bash-completion
+++ b/src/completion/pass.bash-completion
@@ -11,7 +11,7 @@ _pass_complete_entries () {
 	autoexpand=${1:-0}
 
 	local IFS=$'\n'
-	local items=($(compgen -f $prefix$cur))
+	local items=($(compgen -f $prefix/$cur))
 
 	# Remember the value of the first item, to see if it is a
directory. If # it is a directory, then don't add a space to the
completion
-- 
2.10.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20161025/ff4bb2dd/attachment.asc>


More information about the Password-Store mailing list