diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2020-03-01 21:14:06 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2020-03-01 21:14:06 +0530 |
commit | 46827babf93eb23b32505faa4b01fb59cf97b811 (patch) | |
tree | d46f1ff28842b7bb5962ae5fbd1b4279699c5f97 /pw | |
parent | e331e3b77386f44fdfb15155110c747046b993e7 (diff) | |
download | pw-46827babf93eb23b32505faa4b01fb59cf97b811.tar.gz |
Add some much needed '\n's
Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Diffstat (limited to 'pw')
-rwxr-xr-x | pw | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -7,9 +7,9 @@ | |||
7 | init() { | 7 | init() { |
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() { | |||
60 | copy() { | 60 | copy() { |
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 | ||
66 | usage() { | 66 | usage() { |