aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/pass.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d/pass.bash')
-rw-r--r--bash/bashrc.d/pass.bash7
1 files changed, 4 insertions, 3 deletions
diff --git a/bash/bashrc.d/pass.bash b/bash/bashrc.d/pass.bash
index e173531f..d40a833f 100644
--- a/bash/bashrc.d/pass.bash
+++ b/bash/bashrc.d/pass.bash
@@ -8,7 +8,8 @@ fi
_pass()
{
# If we can't read the password directory, just bail
- local passdir=${PASSWORD_STORE_DIR:-$HOME/.password-store}
+ local passdir
+ passdir=${PASSWORD_STORE_DIR:-$HOME/.password-store}
if [[ ! -r $passdir ]] ; then
return 1
fi
@@ -16,8 +17,8 @@ _pass()
# Iterate through list of .gpg paths, extension stripped, null-delimited,
# and filter them down to the ones matching the completing word (compgen
# doesn't seem to do this properly with a null delimiter)
- local word=${COMP_WORDS[COMP_CWORD]}
- local entry
+ local word entry
+ word=${COMP_WORDS[COMP_CWORD]}
while read -d '' -r entry ; do
if [[ $entry == "$word"* ]] ; then
COMPREPLY=("${COMPREPLY[@]}" "$entry")