summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkeyringer3
-rw-r--r--lib/keyringer/completions/bash4
2 files changed, 4 insertions, 3 deletions
diff --git a/keyringer b/keyringer
index 934f600..a2ca1f4 100755
--- a/keyringer
+++ b/keyringer
@@ -112,6 +112,9 @@ BASENAME="`basename $0`"
KEYRING="$1"
ACTION="$2"
+# Turn off pathname expansion so expansion can work properly
+set -f
+
# Export preferences and version for other scripts
export PREFERENCES="`dirname $CONFIG`/$KEYRING"
export KEYRINGER_VERSION
diff --git a/lib/keyringer/completions/bash b/lib/keyringer/completions/bash
index c91a8ef..f962c6a 100644
--- a/lib/keyringer/completions/bash
+++ b/lib/keyringer/completions/bash
@@ -35,12 +35,10 @@ _keyringer() {
opts="ls edit"
;;
ls)
- # TODO
if [ -z "${cur}" ]; then
opts="`keyringer $instance ls -p`"
else
- local append
- opts="`keyringer $instance ls -p -d ${cur}* 2> /dev/null`"
+ opts="$(bash -c "set -f && keyringer $instance ls -p -d ${cur}*")"
fi
;;
*)