diff options
author | lassulus <git@lassul.us> | 2023-03-25 09:02:04 +0100 |
---|---|---|
committer | lassulus <git@lassul.us> | 2023-03-25 09:02:04 +0100 |
commit | 781012ef25603256368253ef551ca079d25bd730 (patch) | |
tree | ccf0540a674a3dbe3ccb50dcc150eaec7b49ed06 /tv/5pkgs/simple/fzmenu/bin/passmenu | |
parent | 3a2db935a3b3565fb17b38e2eede929240241fc2 (diff) | |
parent | 2186f0dc3a35400e9bd529c707ba74741b4a923f (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/5pkgs/simple/fzmenu/bin/passmenu')
-rwxr-xr-x | tv/5pkgs/simple/fzmenu/bin/passmenu | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tv/5pkgs/simple/fzmenu/bin/passmenu b/tv/5pkgs/simple/fzmenu/bin/passmenu index da8e739..76153f5 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 \ |