From d6fea7fdcacf61bc7e47a38d85f96ac6df26869f Mon Sep 17 00:00:00 2001 From: lingtalfi Date: Tue, 22 Sep 2015 07:04:35 +0200 Subject: [PATCH] add program name prefix to exit messages --- bashmarks.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bashmarks.sh b/bashmarks.sh index b77a8c1..63b62f0 100644 --- a/bashmarks.sh +++ b/bashmarks.sh @@ -40,6 +40,7 @@ touch $SDIRS RED="0;31m" GREEN="0;33m" +PROGRAM_NAME="bashmarks" # save current directory to bookmarks function s { @@ -117,10 +118,10 @@ function _l { function _bookmark_name_valid { exit_message="" if [ -z $1 ]; then - exit_message="bookmark name required" + exit_message="${PROGRAM_NAME}: bookmark name required" echo $exit_message elif [ "$1" != "$(echo $1 | sed 's/[^A-Za-z0-9_]//g')" ]; then - exit_message="bookmark name is not valid" + exit_message="${PROGRAM_NAME}: bookmark name is not valid" echo $exit_message fi }