19 lines
383 B
Bash
Executable file
19 lines
383 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
get_accounts() {
|
|
find ~/.password-store \
|
|
| grep "$HOME/.password-store/"\
|
|
| sed "s|$HOME/.password-store/||"\
|
|
| grep "\gpg$" \
|
|
| sed "s/\.gpg$//" \
|
|
| grep ".*/" \
|
|
| grep -v "^z/"
|
|
}
|
|
|
|
main () {
|
|
selected="$(get_accounts 2>/dev/null \
|
|
| rofi -dmenu -p 'pass')"
|
|
pass -c "$selected"
|
|
}
|
|
|
|
main
|