summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/simple/fzmenu/bin/passmenu
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-04-02 18:42:50 +0200
committermakefu <github@syntax-fehler.de>2023-04-02 18:42:50 +0200
commit7239ec83c5531fa100d1863fec9d82033d13ad34 (patch)
tree1cfde19ffaf06d44a5fd30d7fc0ca2eaad2d4ad2 /tv/5pkgs/simple/fzmenu/bin/passmenu
parentd335011fce054bebc0e429ea10bccabaf898d2b2 (diff)
parentc4bf35d8e13d1258fcbacd118a0fc75197b9fe7e (diff)
Merge remote-tracking branch 'lassul.us/master'
Diffstat (limited to 'tv/5pkgs/simple/fzmenu/bin/passmenu')
-rwxr-xr-xtv/5pkgs/simple/fzmenu/bin/passmenu12
1 files changed, 8 insertions, 4 deletions
diff --git a/tv/5pkgs/simple/fzmenu/bin/passmenu b/tv/5pkgs/simple/fzmenu/bin/passmenu
index da8e739ee..76153f53e 100755
--- a/tv/5pkgs/simple/fzmenu/bin/passmenu
+++ b/tv/5pkgs/simple/fzmenu/bin/passmenu
@@ -10,14 +10,18 @@ case ${FZMENU_PHASE-0} in
;;
1)
if result=$(
+ PASSWORD_STORE_DIR=${PASSWORD_STORE_DIR-$HOME/.password-store}
FZF_DEFAULT_OPTS=${FZMENU_FZF_DEFAULT_OPTS-}
if test -n "$FZF_DEFAULT_OPTS"; then
export FZF_DEFAULT_OPTS
fi
- pass git ls-files '*/*.gpg' | \
- sed '
- /\/otp\.gpg$:/d
- s/\.gpg$//
+ find -L "$PASSWORD_STORE_DIR" -type f -name '*.gpg' |
+ awk -F / -v PASSWORD_STORE_DIR="$PASSWORD_STORE_DIR" '
+ { n = length(PASSWORD_STORE_DIR "/") }
+ $NF == "otp.gpg" { next }
+ /.*\.gpg$/ {
+ print substr($0, 1 + n, length($0)-length(".gpg")-n)
+ }
' |
exec fzf \
--history=/dev/null \