aboutsummaryrefslogtreecommitdiff
path: root/pw
diff options
context:
space:
mode:
authorAnirudh Oppiliappan <x@icyphox.sh>2020-01-13 23:54:36 +0530
committerAnirudh Oppiliappan <x@icyphox.sh>2020-01-13 23:54:36 +0530
commite331e3b77386f44fdfb15155110c747046b993e7 (patch)
tree09c5709c6138713ecb9edf18ce9caf08b3de9503 /pw
parent2b60c621abcaa7425260ca5e7393b9dd964f315c (diff)
downloadpw-e331e3b77386f44fdfb15155110c747046b993e7.tar.gz
-s now shows the full file
Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Diffstat (limited to 'pw')
-rwxr-xr-xpw4
1 files changed, 2 insertions, 2 deletions
diff --git a/pw b/pw
index b3f1dc9..3c3d7bd 100755
--- a/pw
+++ b/pw
@@ -52,14 +52,14 @@ del() {
52 52
53show() { 53show() {
54 checkf "$PW_DIR/$1.gpg" 54 checkf "$PW_DIR/$1.gpg"
55 gpg2 --decrypt --quiet --use-agent "$PW_DIR/$1.gpg" | head -1 55 gpg2 --decrypt --quiet --use-agent "$PW_DIR/$1.gpg"
56} 56}
57 57
58# TODO: rework having to checkf twice 58# TODO: rework having to checkf twice
59 59
60copy() { 60copy() {
61 checkf "$PW_DIR/$1.gpg" 61 checkf "$PW_DIR/$1.gpg"
62 show "$1" | xclip -rmlastnl -selection clipboard 62 show "$1" | head -1 | xclip -rmlastnl -selection clipboard
63 printf "pw: copied %s to clipboard" "$1" 63 printf "pw: copied %s to clipboard" "$1"
64} 64}
65 65