Function to edit passwords with fzf+pass

This commit is contained in:
Jeremy Gardais 2023-02-04 10:44:32 +01:00
parent d3f75c0e11
commit 35c5bb5b79
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 12 additions and 0 deletions

12
zshrc
View File

@ -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 {{{ # zsh-syntax-highlighting {{{
## Activate if plugin is available ## Activate if plugin is available