[pass] [PATCH 1/1] OpenBSD's sed does not like '( ->|$)'.
David Dahlberg
david.dahlberg at fkie.fraunhofer.de
Tue Feb 9 12:28:56 CET 2016
---
src/password-store.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/password-store.sh b/src/password-store.sh
index 63be840..3a0be77 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -324,7 +324,10 @@ cmd_show() {
else
echo "${path%\/}"
fi
- tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors
+ # remove .gpg at end of line, but keep colors
+ tree -C -l --noreport "$PREFIX/$path" \
+ | tail -n +2 \
+ | sed -e 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\)/\1\2/g' -e 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\($\)/\1\2/g'
elif [[ -z $path ]]; then
die "Error: password store is empty. Try \"pass init\"."
else
--
2.7.0
More information about the Password-Store
mailing list