aboutsummaryrefslogtreecommitdiff
path: root/dpw-gpg
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-10-25 21:09:03 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-10-25 21:09:10 -0400
commit34d76d7d76f7554f846e59b62e4d21d76a85d970 (patch)
treeca0d6709cf3f1aa4161c710402a512caa96c4048 /dpw-gpg
parent04154746f58048bf08368b6b71a7950ad7271cc3 (diff)
downloaddpw-34d76d7d76f7554f846e59b62e4d21d76a85d970.tar.gz
dpw-34d76d7d76f7554f846e59b62e4d21d76a85d970.tar.xz
MacOS compatibility
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() {