summaryrefslogtreecommitdiff
path: root/scripts/passotpmenu
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2023-07-08 14:48:02 +0200
committerTom Barrett <tom@tombarrett.xyz>2023-07-08 14:48:02 +0200
commit0039908addac751c165395ebc3ead5220becd68a (patch)
tree0f3d52b20d98d2cfd3924f352e93081dbebdcbd9 /scripts/passotpmenu
parent577ba06877f68ba269f35778d1a1349437eb0b7a (diff)
nixos and vim
Diffstat (limited to 'scripts/passotpmenu')
-rwxr-xr-xscripts/passotpmenu11
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