aboutsummaryrefslogtreecommitdiff
path: root/pw
diff options
context:
space:
mode:
authorAnirudh Oppiliappan <x@icyphox.sh>2020-03-01 21:14:06 +0530
committerAnirudh Oppiliappan <x@icyphox.sh>2020-03-01 21:14:06 +0530
commit46827babf93eb23b32505faa4b01fb59cf97b811 (patch)
treed46f1ff28842b7bb5962ae5fbd1b4279699c5f97 /pw
parente331e3b77386f44fdfb15155110c747046b993e7 (diff)
downloadpw-46827babf93eb23b32505faa4b01fb59cf97b811.tar.gz
Add some much needed '\n's
Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Diffstat (limited to 'pw')
-rwxr-xr-xpw10
1 files changed, 5 insertions, 5 deletions
diff --git a/pw b/pw
index 3c3d7bd..b5c8bf2 100755
--- a/pw
+++ b/pw
@@ -7,9 +7,9 @@
7init() { 7init() {
8 if [[ ! -e "$PW_DIR" ]]; then 8 if [[ ! -e "$PW_DIR" ]]; then
9 mkdir -p "$PW_DIR" 9 mkdir -p "$PW_DIR"
10 printf "pw: password directory initialized at %s" "$PW_DIR" 10 printf "pw: password directory initialized at %s\n" "$PW_DIR"
11 else 11 else
12 printf "PW_DIR is %s" "$PW_DIR" 12 printf "PW_DIR is %s\n" "$PW_DIR"
13 die "$PW_DIR exists" 13 die "$PW_DIR exists"
14 fi 14 fi
15} 15}
@@ -24,11 +24,11 @@ add() {
24 else 24 else
25 # uses default length of 25 chars, unless PW_LEN is set 25 # uses default length of 25 chars, unless PW_LEN is set
26 pass="$(pwgen "${PW_LEN:-25}" 1 -s)" 26 pass="$(pwgen "${PW_LEN:-25}" 1 -s)"
27 printf "pw: generated password for %s" "$1" 27 printf "pw: generated password for %s\n" "$1"
28 fi 28 fi
29 if [[ ! -f "$PW_DIR/$1.gpg" ]]; then 29 if [[ ! -f "$PW_DIR/$1.gpg" ]]; then
30 printf "%s" "$pass" | gpg2 -er "$PW_KEY" -o "$PW_DIR/$1.gpg" 30 printf "%s" "$pass" | gpg2 -er "$PW_KEY" -o "$PW_DIR/$1.gpg"
31 printf "pw: %s/%s.gpg created" "$PW_DIR" "$1" 31 printf "pw: %s/%s.gpg created\n" "$PW_DIR" "$1"
32 else 32 else
33 die "the file %s/%s.gpg exists" "$PW_DIR" "$1" 33 die "the file %s/%s.gpg exists" "$PW_DIR" "$1"
34 fi 34 fi
@@ -60,7 +60,7 @@ show() {
60copy() { 60copy() {
61 checkf "$PW_DIR/$1.gpg" 61 checkf "$PW_DIR/$1.gpg"
62 show "$1" | head -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\n" "$1"
64} 64}
65 65
66usage() { 66usage() {