aboutsummaryrefslogtreecommitdiff
path: root/.local/share/pass-extensions/names.bash
blob: 4ef474abe878d178c7379fd0abd05ccf86be5af4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# list all passwords in store

pass_dir="$(pass directory)"
[ $? -ne 0 ] && exit 1
cd "$pass_dir"

# List all files in password store (ignoring .git and .extensions folders) and
# trim './' prefix and '.gpg' suffix
find . \
	-type d -name '.git' -prune \
	-o -type d -name '.extensions' -prune \
	-o -name '*.gpg' \
	-type f \
	-print |\
cut -c3- | rev | cut -c5- | rev