From 0ccb898021f8838ba3bc8ed0a256899f9b571a81 Mon Sep 17 00:00:00 2001 From: Samuel Lethiec Date: Mon, 11 May 2015 13:43:38 +0200 Subject: bashcomp: PASSWORD_STORE_DIR env var does not necessarily have a trailing slash --- src/completion/pass.bash-completion | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/completion/pass.bash-completion b/src/completion/pass.bash-completion index ea31fbf..efd4b70 100644 --- a/src/completion/pass.bash-completion +++ b/src/completion/pass.bash-completion @@ -6,6 +6,7 @@ _pass_complete_entries () { prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store/}" + prefix="${prefix%/}/" suffix=".gpg" autoexpand=${1:-0} @@ -42,6 +43,7 @@ _pass_complete_entries () { _pass_complete_folders () { prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store/}" + prefix="${prefix%/}/" local IFS=$'\n' local items=($(compgen -d $prefix$cur)) -- cgit v1.2.3