summaryrefslogtreecommitdiff
path: root/bin/dmscripts/dmpass
blob: 2af798b665abf3f890eb7e0e28b8f3b11651a35d (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
store="$HOME/.password-store"
lscmd="ls --group-directories-first"
dmenucmd="dmenu -l 4 -g 2"
while [ -d "${store}/${file}" ]
do
	choice="$($lscmd "${store}/${file}" | awk -F'.gpg' '{print $1}' | $dmenucmd)"
	[ "$choice" ] || break
	file="${file}/${choice}"
done
pass show -c "${file}"