diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/keyringer/completions/bash | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/keyringer/completions/bash b/lib/keyringer/completions/bash index dd8b8e9..5b2f71d 100644 --- a/lib/keyringer/completions/bash +++ b/lib/keyringer/completions/bash @@ -39,7 +39,17 @@ _keyringer() { if [ -z "${cur}" ]; then opts="`keyringer $instance ls -p`" else - opts="`keyringer $instance ls -p -d ${cur}*`" + local append + opts="`keyringer $instance ls -p -d ${cur}* 2> /dev/null`" + + # Append the contents of each folder, one level down + for opt in $opts; do + if echo $opt | grep -qe '/$'; then + append="$append `keyringer $instance ls -d $opt* 2> /dev/null`" + fi + done + + #opts="$opts $append" fi ;; *) |