#!/usr/bin/env bash ## Run the `show` subcommand of the password manager `pass`, but instead of ## entering the password name as usual, select the password file using fzf. ## ## Usage: pass-show [...] ## ## Dependencies: fzf, GNU findutils, GNU sed, pass set -euo pipefail shopt -s inherit_errexit [[ " $* " =~ ' --help ' ]] && sed -n 's/^## *//p' "$0" && exit cd "${PASSWORD_STORE_DIR-~/.password-store}" fzf | sed 's/\.gpg$//' | xargs pass show "$@"