From de5b6bcb6e6a630d87c23cfb614e4146fa94ecae Mon Sep 17 00:00:00 2001 From: "J. Elfring (i)" Date: Mon, 22 May 2023 14:37:59 +0200 Subject: [PATCH] More features for fzpass --- simpleDots/bin/fzpass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/simpleDots/bin/fzpass b/simpleDots/bin/fzpass index f3f30ba..1b99cba 100755 --- a/simpleDots/bin/fzpass +++ b/simpleDots/bin/fzpass @@ -13,16 +13,23 @@ password_files=$( find $prefix -name '*.gpg' \ | rev | cut --characters 5- | rev ) -## Send the filelist to fzf, use # for a preview and -## disable the fzf mous to use the primary selection +## Send the filelist to fzf, +## disable the fzf mouse to use the primary selection password=$( printf '%s\n' "${password_files[@]}" \ - | fzf --bind='#:toggle-preview' \ + | fzf --bind='ctrl-s:toggle-preview' \ + --bind='ctrl-u:execute(pass git pull)+execute(pass git push)' \ + --bind='ctrl-e:execute(pass edit {} < /dev/tty > /dev/tty)' \ --preview='pass show {}' \ --preview-window="hidden" \ --no-mouse \ + --header=' +Ret: Copy password & show OTP; C-s: Show entry; C-e: Edit entry +C-u: Update repo (Pull & Push)' $@ \ ) ## Exit if nothing was selected test "_$password" = "_" && exit pass show -c "$password" 2>/dev/null +pass otp "$password" 2>/dev/null +