diff --git a/zshrc b/zshrc index ba9ac67..37c6870 100644 --- a/zshrc +++ b/zshrc @@ -2468,6 +2468,18 @@ dexec() { } # }}} +# passf − Edit pass's passwords {{{ +# Display existing files in ~/.password-store without .gpg extension +# https://www.passwordstore.org/ +passf() { + local pass_files + + pass_file=$(find ~/.password-store -type f -iname "*.gpg" -printf "%P\n" | sed 's/\(.*\)\.gpg$/\1/' | fzf --prompt='pass > ' ) + + pass edit "${pass_file:-/dev/null}" +} +# }}} + # }}} # zsh-syntax-highlighting {{{ ## Activate if plugin is available