diff --git a/share/completion/cal b/share/completion/cal new file mode 100644 index 00000000..67ff4d2c --- /dev/null +++ b/share/completion/cal @@ -0,0 +1,39 @@ +# (C) 2025 unrealapex + +# Completion script for cal + +function completion/cal { + + typeset OPTIONS ARGOPT PREFIX + OPTIONS=( #># + "l; turn off highlighting of today" + "J; display Julian Calendar" + "e; display date of Easter" + "j; display Julian days" + "M; display monday as the first day of the week" + "m:; display the specified *month*" + "o; display the date of Orthodox Easter" + "p; print the country codes and switching days from Julian to Gregorian Calendar" + "s; assume the switch from Julian to Gregorian Calendar at the date associated with *country_code*" + "w; print the number of the week below each week column" + "y; display a calendar for the specified *year*" + "3; display the previous, current, and next month" + "A; display the number of *months* after the current month" + "B; display the number of *months* before the current month" + "C; switch to cal mode" + "N; switch to ncal mode" + "d; use *yyyy-mm* as the current date (for debugging)" + "H; use *yyyy-mm-dd* as the current date (for debugging)" + ) #<# + + command -f completion//parseoptions -es + case $ARGOPT in + (-) + command -f completion//completeoptions + ;; + esac + +} + + +# vim: set ft=sh ts=8 sts=8 sw=8 et: diff --git a/share/completion/ncal b/share/completion/ncal new file mode 100644 index 00000000..57a82978 --- /dev/null +++ b/share/completion/ncal @@ -0,0 +1,10 @@ +# (C) 2025 magicant unrealapex + +# Completion script for the "ncal" command. + +function completion/ncal { + command -f completion//reexecute cal +} + + +# vim: set ft=sh ts=8 sts=8 sw=8 et: