aboutsummaryrefslogtreecommitdiff
path: root/dpw-gpg
diff options
context:
space:
mode:
Diffstat (limited to 'dpw-gpg')
-rwxr-xr-xdpw-gpg14
1 files changed, 8 insertions, 6 deletions
diff --git a/dpw-gpg b/dpw-gpg
index 538520b..d26b665 100755
--- a/dpw-gpg
+++ b/dpw-gpg
@@ -96,12 +96,14 @@ _git_commit "Insert: $pth"
}
list() {
-cd "$PASSWORD_STORE_DIR"
-find ./"$1" -type f \
- | sed -e's@^\./@@g' \
- | sed -e'/^\./d' \
- | sed -e'/\.gpg-id$/d' \
- | sed -e's/\.gpg$//g'
+find "$PASSWORD_STORE_DIR/$1" -type f -iname "*.gpg" \
+ | while read -r line ; do
+ line="${line##$PASSWORD_STORE_DIR}"
+ line="${line#/}"
+ line="${line#/}"
+ line="${line%.gpg}"
+ echo "$line"
+ done
}
remove() {