dotfiles/.bin/OLD/passmenu
2024-02-14 07:55:58 +01:00

12 lines
333 B
Bash
Executable File

#!/usr/bin/env bash
shopt -s nullglob globstar
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | fzf)
[[ -n $password ]] || exit
pass "$password"