add a function to show appointments, callable from .profile
authormirabilos <t.glaser@tarent.de>
Thu, 16 Aug 2018 18:51:14 +0000 (20:51 +0200)
committermirabilos <mirabilos@evolvis.org>
Thu, 16 Aug 2018 18:51:14 +0000 (20:51 +0200)
mksh/profile-funcs

index eab46bb..528ef51 100644 (file)
@@ -11,3 +11,13 @@ xv() {
        done
        return $rv
 }
+
+# show appointments
+function showtermine {
+       [[ -s ~/.etc/Termine ]] || return 0
+       calendar -f ~/.etc/Termine | while IFS='        ' read a b; do
+               typeset -L8 a
+               b=$(fold -sw 70 <<<"$b")
+               print -r -- "‣ $a${b//$'\n'/$'\n\t  '}"
+       done
+}