aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2015-05-11 14:06:32 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-05-11 14:06:32 +0200
commita619988f7986d72f4e0ac7256ce48596df6a2a34 (patch)
tree327cf38dfbe7c66bf8a66fe8f299343172158b23 /src
parentcritcal fix for cygwin: gpg output to stdout ("gpg -o -") would have been putput to a file named "-" (diff)
downloadpassword-store-a619988f7986d72f4e0ac7256ce48596df6a2a34.tar.xz
password-store-a619988f7986d72f4e0ac7256ce48596df6a2a34.zip
Fix .gpg stripping
Diffstat (limited to 'src')
-rwxr-xr-xsrc/password-store.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 79d2096..13e07e2 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -322,7 +322,7 @@ cmd_show() {
else
echo "${path%\/}"
fi
- tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' # 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)?( ->|$)/\1\2/g' # remove .gpg at end of line, but keep colors
elif [[ -z $path ]]; then
die "Error: password store is empty. Try \"pass init\"."
else
@@ -334,7 +334,7 @@ cmd_find() {
[[ -z "$@" ]] && die "Usage: $PROGRAM $COMMAND pass-names..."
IFS="," eval 'echo "Search Terms: $*"'
local terms="*$(printf '%s*|*' "$@")"
- tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g'
+ tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
}
cmd_grep() {