spm

Personal fork of spm (simple password manager)
git clone git@getsh.org:spm.git
Log | Files | Refs | README | LICENSE

commit 115e463b65bd55eef1a3250327184aa0b6d33bd1
parent d98b71f2f027c4bfe5209c853d1f6f8b1d55faf6
Author: Klemens Nanni <kl3@posteo.org>
Date:   Wed,  2 Mar 2016 05:13:04 +0100

Use printf not echo

Diffstat:
Mtpm | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tpm b/tpm @@ -31,13 +31,13 @@ fi ### Helper ### abort() { - echo "${1}" 1>&2 + printf '%s\n' "${1}" 1>&2 exit 1 } readpw() { if [ -t 0 ]; then - printf "%s" "${1}" + printf '%s' "${1}" stty -echo fi @@ -46,7 +46,7 @@ readpw() { } usage() { - echo "USAGE: tpm show|insert|list|help [ENTRY|GROUP]" + printf 'USAGE: tpm show|insert|list|help [ENTRY|GROUP]\n' } ### Commands ### @@ -59,7 +59,7 @@ insert() { password="" readpw "Password for '${1}': " password - [ -t 0 ] && printf "\n" + [ -t 0 ] && printf '\n' [ -z "${password}" ] && abort "You didn't specify a password." @@ -76,7 +76,7 @@ list() { tree --noreport -l -C -- "${STORE_DIR}/${1}" \ | sed 's/.gpg$//g' - echo + printf '\n' } remove() {