From: Dmitry Fedotov Date: Fri, 26 May 2023 21:26:29 +0000 (+0300) Subject: Add passc & passf functions. X-Git-Url: https://www.git.dmfe.net/?a=commitdiff_plain;h=78753f28d5cad74c16386a7bf8cd5007a83e1d74;p=dotfiles Add passc & passf functions. --- diff --git a/shell/functions/00-functions b/shell/functions/00-functions index 785650b..f4c6859 100644 --- a/shell/functions/00-functions +++ b/shell/functions/00-functions @@ -14,3 +14,12 @@ function cdd() { fi } +function passc() { + local choice=$(find $HOME/.password-store -type f -name '*.gpg' -printf '%P\n' | sed 's/\.gpg//' | fzf) + [[ -n "$choice" ]] && pass $choice | xclip +} + +function passf() { + pass find $1 +} +