diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/passotpmenu | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/passotpmenu b/scripts/passotpmenu index 0e1c834..f46dc09 100755 --- a/scripts/passotpmenu +++ b/scripts/passotpmenu @@ -20,9 +20,9 @@ else fi prefix=${PASSWORD_STORE_DIR-~/.password-store} -password_files=( "$prefix"/**/*.gpg ) -password_files=( "${password_files[@]#"$prefix"/}" ) -password_files=( "${password_files[@]%.gpg}" ) +password_files=("$prefix"/**/*.gpg) +password_files=("${password_files[@]#"$prefix"/}") +password_files=("${password_files[@]%.gpg}") for f in "${password_files[@]}"; do [[ $f == *"otp"* ]] && otp_files+=("$f"); done password=$(printf '%s\n' "${otp_files[@]}" | "$dmenu" "$@") @@ -32,5 +32,8 @@ password=$(printf '%s\n' "${otp_files[@]}" | "$dmenu" "$@") if [[ $typeit -eq 0 ]]; then pass otp show -c "$password" 2>/dev/null else - pass otp show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool + pass otp show "$password" | { + IFS= read -r pass + printf %s "$pass" + } | $xdotool fi |