spm

Personal fork of spm (simple password manager)

commit cfb81e80256e8be94435e80ffa0bd5f474cbdbc6
parent 414bfc644f8f544809b39dc804e382a1335c85a2
Author: Klemens Nanni <kl3@posteo.org>
Date: Mon, 16 May 2016 01:01:22 +0200

Reword error messages
1 file changed, 4 insertions(+), 7 deletions(-)
M
tpm.sh
|
11
++++-------
diff --git a/tpm.sh b/tpm.sh
@@ -48,10 +48,8 @@ readpw() {
 ## Commands
 
 insert() {
-	[ -z "${1}" ] && abort 'USAGE: tpm insert ENTRY'
-
-	[ -e "${STORE_DIR}"/"${1}".gpg ] \
-		&& abort 'Entry already exists.'
+	[ -z "${1}" ] && abort 'Name must not be empty.'
+	[ -e "${STORE_DIR}"/"${1}".gpg ] && abort 'Entry already exists.'
 
 	readpw "Password for '${1}': " password
 	[ -t 0 ] && printf '\n'

@@ -75,15 +73,14 @@ list() {
 }
 
 remove() {
-	[ -z "${1}" ] && abort 'USAGE: tpm remove ENTRY'
-
+	[ -z "${1}" ] && abort 'Name must not be empty.'
 	[ -w "${STORE_DIR}"/"${1}".gpg ] || abort 'No such entry.'
 
 	rm -i "${STORE_DIR}"/"${1}".gpg
 }
 
 show() {
-	[ -z "${1}" ] && abort 'USAGE: tpm show ENTRY'
+	[ -z "${1}" ] && abort 'Name must not be empty.'
 
 	entry="${STORE_DIR}"/"${1}".gpg