14 lines
378 B
Bash
Executable file
14 lines
378 B
Bash
Executable file
#!/bin/bash
|
|
|
|
## A wrapper for pass to use fzf to find passwords.
|
|
|
|
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 show -c "$password" 2>/dev/null
|