about summary refs log tree commit diff
path: root/Functions/Calendar/calendar
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-08-16 12:03:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-08-16 12:03:57 +0000
commit0a607f5eefec38cc7ef625f1692bd1d12e969f90 (patch)
tree588130ff573e5d07ac2fa8f43b355dacbaaf4e79 /Functions/Calendar/calendar
parentc05f1046d874fa51eb11c395ed1e2f2b184cddb5 (diff)
downloadzsh-0a607f5eefec38cc7ef625f1692bd1d12e969f90.tar.gz
zsh-0a607f5eefec38cc7ef625f1692bd1d12e969f90.tar.xz
zsh-0a607f5eefec38cc7ef625f1692bd1d12e969f90.zip
23764: allow hidden continuations in calendar entries
allow UIDs to help with updates
Diffstat (limited to 'Functions/Calendar/calendar')
-rw-r--r--Functions/Calendar/calendar7
1 files changed, 7 insertions, 0 deletions
diff --git a/Functions/Calendar/calendar b/Functions/Calendar/calendar
index 328da853c..b5df2ca72 100644
--- a/Functions/Calendar/calendar
+++ b/Functions/Calendar/calendar
@@ -293,6 +293,13 @@ fi
       showline=${line%%$'\n'*}
     else
       showline=$line
+      match=()
+      # Strip continuation lines starting " #".
+      while [[ $showline = (#b)(*$'\n')[[:space:]]##\#[^$'\n']##(|$'\n'(*)) ]]; do
+	showline="$match[1]$match[3]"
+      done
+      # Strip trailing empty lines
+      showline=${showline%%[[:space:]]#}
     fi
     if (( showall || (t >= start && (remaining || t <= stop || icount < showcount)) ))
     then