From cb85d683722a62998d2edaeee50d52d9fc06d520 Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Fri, 7 Aug 2026 15:46:21 +0300 Subject: [PATCH] Add support for debian's bsd calendar command --- .zshrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.zshrc b/.zshrc index f0ac322..601bd76 100644 --- a/.zshrc +++ b/.zshrc @@ -272,6 +272,15 @@ setopt INC_APPEND_HISTORY_TIME # by default show 3 months of calendar with week number # but also allow to override it function cal { + local BSDCALENDAR=$(which -p ncal) + if [[ $# -eq 0 ]]; then + $BSDCALENDAR -3b + return + else + $BSDCALENDAR -b "$@" + return + fi + local CALENDAR=$(which -p cal) if [[ $# -eq 0 ]]; then $CALENDAR -m -w3