dotfiles/.bin/OLD/passmenu

12 lines
333 B
Plaintext
Raw Normal View History

2023-02-22 08:31:38 +01:00
#!/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"