m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/completion/pass.bash-completion
diff options
context:
space:
mode:
authorSamuel Lethiec <samuel.lethiec@intelunix.fr>2015-05-11 13:43:38 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-05-11 13:43:38 +0200
commit0ccb898021f8838ba3bc8ed0a256899f9b571a81 (patch)
treecb5220686c3cb34b026b1acf9cbb64a140664b30 /src/completion/pass.bash-completion
parent18f36f05367f78820632870bff09bf80685d115b (diff)
bashcomp: PASSWORD_STORE_DIR env var does not necessarily have a trailing slash
Diffstat (limited to 'src/completion/pass.bash-completion')
-rw-r--r--src/completion/pass.bash-completion2
1 files changed, 2 insertions, 0 deletions
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))