From 2d8969d3d85c063e70045f529450c87a6b94c895 Mon Sep 17 00:00:00 2001 From: shnee Date: Sat, 5 Jan 2019 22:28:01 -0500 Subject: [PATCH] Multi-line messages. - Added clarification on how to send multi-line messages. --- README.md | 3 ++- errol | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f0dd2d1..458baf4 100644 --- a/README.md +++ b/README.md @@ -27,5 +27,6 @@ Arguments: -t,--title The title of the notification. -m,--msg - The message body of the notification. + The message body of the notification. Multi-line messages must be done + with literal '\n's. ``` diff --git a/errol b/errol index 3c56dd1..36e4e92 100755 --- a/errol +++ b/errol @@ -50,7 +50,8 @@ Arguments: -$SHORT_TITLE_STR,--$LONG_TITLE_STR The title of the notification. -$SHORT_MSG_STR,--$LONG_MSG_STR - The message body of the notification. + The message body of the notification. Multi-line messages must be done + with literal '\n's. " } @@ -61,7 +62,7 @@ Arguments: ################################################################################ function checkForRequiredArgs() { - if [ -z $TITLE ] || [ -z $MSG ] || [ -z $TOKEN ]; then + if [ -z "$TITLE" ] || [ -z "$MSG" ] || [ -z "$TOKEN" ]; then echo " Error: One of the required args was empty.