[prev in list] [next in list] [prev in thread] [next in thread] 

List:       password-store
Subject:    [pass] [PATCH] tree listing: remove .gpg at the end, but keep bash colorzing
From:       Lenz Weber <mail () lenzw ! de>
Date:       2014-09-21 19:31:05
Message-ID: 1411327865-1768-1-git-send-email-mail () lenzw ! de
[Download RAW message or body]

---
 src/password-store.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/password-store.sh b/src/password-store.sh
index 2287a46..851b371 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -332,7 +332,7 @@ cmd_show() {
 		else
 			echo "${path%\/}"
 		fi
-		tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//'
+                tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed \
's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}$/\1/' #remove .gpg at end of line, but keep colors  \
elif [[ -z $path ]]; then  die "Error: password store is empty. Try \"pass init\"."
 	else
-- 
2.1.0

_______________________________________________
Password-Store mailing list
Password-Store@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/password-store


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic