I like that "show -c" copies the password directly to the clipboard without
displaying it, but I often need to see the remainder of a multi-line file
when using a password. This patch does that.
From 595fb555305f872633853445594a30712bf71623 Mon Sep 17 00:00:00 2001
From: Mike Hobbs <[email protected]>
Date: Wed, 4 Nov 2015 09:58:53 -0600
Subject: [PATCH] display the remainder of a multiline file with show -c

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

diff --git a/src/password-store.sh b/src/password-store.sh
index d535a74..4dabd6e 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -315,6 +315,7 @@ cmd_show() {
 			local pass="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | head -n 1)"
 			[[ -n $pass ]] || exit 1
 			clip "$pass" "$path"
+			$GPG -d "${GPG_OPTS[@]}" "$passfile" | tail -n +2
 		fi
 	elif [[ -d $PREFIX/$path ]]; then
 		if [[ -z $path ]]; then
-- 
2.6.1

_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to