From: Paul Hänsch Date: Tue, 6 Feb 2024 14:48:06 +0000 (+0100) Subject: avoid errors from empty event set X-Git-Url: https://git.plutz.net/?p=shellwiki;a=commitdiff_plain;h=31c03d0ffe238c627808f0961f76aa7bb45fa08b avoid errors from empty event set --- diff --git a/macros/calendar b/macros/calendar index 5a48675..a8f8dd6 100755 --- a/macros/calendar +++ b/macros/calendar @@ -291,7 +291,7 @@ cal_month() { printf '' "$dcal" evlist="$( - printf %s\\n "$events" \ + printf %s "${events}${events:+${BR}}" \ | while read start end title link; do if [ "$((start / 86400))" -lt "$((dcnt / 86400))" -a "$end" -gt "$dcnt" ]; then printf '
  • %s
  • ' \