]> git.plutz.net Git - shellwiki/commitdiff
bugfix: initialize variables when declaring local master
authorPaul Hänsch <paul@plutz.net>
Fri, 6 Sep 2024 11:42:35 +0000 (13:42 +0200)
committerPaul Hänsch <paul@plutz.net>
Fri, 6 Sep 2024 11:42:35 +0000 (13:42 +0200)
macros/calendar

index e680cf08f3b28f876c32e2bc339e131f4a1fa8cb..b05c264813f1eddca117c1b29c79ca48ed02e3c1 100755 (executable)
@@ -239,7 +239,7 @@ events="$(
 
 cal_list() {
   # Print list view for upcoming events
-  local lday='' events sdate=$(date -ud "${DY}-${DM}-${DD}" +%s)
+  local lday='' events="$events" sdate=$(date -ud "${DY}-${DM}-${DD}" +%s)
 
   events="$(
     printf %s\\n "$events" \
@@ -263,7 +263,7 @@ cal_list() {
 }
 
 cal_month() {
-  local ws="$ws" events calmonth
+  local ws="$ws" events="$events" calmonth
   local iday idow mname dcnt dow dcal start end title link n
 
   calmonth="$(GET calmonth || printf %i "$((DY * 12 + DM))")"