~palb91/pass-wl

c3cebffe2944923a43b6c836f4625c1064ab7a50 — Pierre-Albéric TROUPLIN 1 year, 3 months ago 1aa8141
fix: true recursive search
1 files changed, 4 insertions(+), 2 deletions(-)

M pass-wl
M pass-wl => pass-wl +4 -2
@@ 2,6 2,8 @@
#
# © 2021, Pierre-Albéric TROUPLIN (palb91)

set -e


# Environments
declare -A content


@@ 73,6 75,8 @@ parse_args() {

# Set $pass_list with the password-store values
get_pass_list() {
    shopt -s globstar

    local _store="${PASSWORD_STORE_DIR:-${HOME}/.password-store}"
    pass_list=( "${_store}"/**/*.gpg         )
    pass_list=( "${pass_list[@]%.gpg}"       )


@@ 99,8 103,6 @@ filter_list() {
        done
    fi

    printf '> %s\n' "${#_match[@]}"

    case "${#_match[@]}" in
        0) _match=( "${pass_list[@]}" )     ;;
        1) selection="${_match[0]}"; return ;;