From daa7ad2cc91e638740ad1fb25ea0cd87540d8b83 Mon Sep 17 00:00:00 2001 From: lw-everestlinux Date: Tue, 30 Aug 2022 17:07:31 -0400 Subject: [PATCH] fixed bugs and improved output --- scripts/now.sh | 57 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/scripts/now.sh b/scripts/now.sh index 18922ec..2480517 100644 --- a/scripts/now.sh +++ b/scripts/now.sh @@ -9,7 +9,7 @@ source ~/.config/now/events.sh while [[ $# -gt 0 ]]; do case $1 in -h|--help) - printf "$blue now - a simple to-do list written in POSIX sh $reset\n" + printf "$blue [ := ] now - a simple to-do list written in POSIX sh [ := ] $reset\n" printf "now {-h --help} show this message\n" #printf "now {-a --add} [name] [date] [time] add an event\n" # This flag is deprecated printf "now {--version} show the current version of now\n" @@ -20,7 +20,7 @@ while [[ $# -gt 0 ]]; do exit 0 ;; --version) - printf "$blue now - v1.0 $reset" + printf "$blue now - v2.0 $reset \n" exit 0 ;; -*|--*) @@ -29,36 +29,37 @@ while [[ $# -gt 0 ]]; do ;; *) printf "$red Unknown option, use --help to see usage $reset" + exit 1 ;; esac done -printf "$blue To do for $now_current_date: $reset\n" +printf "$blue [ := ] To do for $now_current_date: $reset\n" printf "" -printf "$now_event_1" -printf "$now_event_2" -printf "$now_event_3" -printf "$now_event_4" -printf "$now_event_5" -printf "$now_event_6" -printf "$now_event_7" -printf "$now_event_8" -printf "$now_event_9" -printf "$now_event_10" -printf "$now_event_11" -printf "$now_event_12" -printf "$now_event_13" -printf "$now_event_14" -printf "$now_event_15" -printf "$now_event_16" -printf "$now_event_17" -printf "$now_event_18" -printf "$now_event_19" -printf "$now_event_20" -printf "$now_event_21" -printf "$now_event_22" -printf "$now_event_23" -printf "$now_event_24" -printf "$now_event_25" +printf "- $now_event_1" +printf "- $now_event_2" +printf "- $now_event_3" +printf "- $now_event_4" +printf "- $now_event_5" +printf "- $now_event_6" +printf "- $now_event_7" +printf "- $now_event_8" +printf "- $now_event_9" +printf "- $now_event_10" +printf "- $now_event_11" +printf "- $now_event_12" +printf "- $now_event_13" +printf "- $now_event_14" +printf "- $now_event_15" +printf "- $now_event_16" +printf "- $now_event_17" +printf "- $now_event_18" +printf "- $now_event_19" +printf "- $now_event_20" +printf "- $now_event_21" +printf "- $now_event_22" +printf "- $now_event_23" +printf "- $now_event_24" +printf "- $now_event_25" exit 0