aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sh/.local
diff options
context:
space:
mode:
Diffstat (limited to 'sh/.local')
-rwxr-xr-xsh/.local/bin/passmenu19
1 files changed, 7 insertions, 12 deletions
diff --git a/sh/.local/bin/passmenu b/sh/.local/bin/passmenu
index d99949c..4e0b265 100755
--- a/sh/.local/bin/passmenu
+++ b/sh/.local/bin/passmenu
@@ -1,14 +1,9 @@
#!/bin/sh
-if [ ! -t 0 ]; then
- set -- "$@" "$(cat)"
-elif [ $# -eq 0 ]; then
- for passwd in "$PASSWORD_STORE_DIR"/**/*.gpg; do
- passwd="${passwd#"$PASSWORD_STORE_DIR"/}"
- printf '%s\n' "${passwd%.gpg}"
- done
- exit 0
-fi
-
-# shellcheck disable=SC2068
-pass show $@ | head -n1
+for file in "$PASSWORD_STORE_DIR"/**/*.gpg; do
+ if [ -e "$file" ]; then
+ file="${file#"$PASSWORD_STORE_DIR"/}"
+ printf '%s\n' "${file%.gpg}"
+ fi
+done
+exit 0