1#compdef cal ncal 2 3local args 4 5case $service in 6 cal) 7 args=( 8 '-3[three in a row]' 9 '-m[Monday as first day of the week]' 10 ) 11 ;; 12 ncal) 13 args=( 14 '-J[display Julian calendar]' 15 '-e[display date of western Easter]' 16 '-o[display date of orthodox Easter]' 17 '-p[assume as by ncal]' 18 '-s[country code]' 19 '-w[print number of the week below each column]' 20 ) 21 ;; 22esac 23 24_arguments "${args[@]}" \ 25 '-j[display Julian days]' \ 26 '-y[display a calendar for the current year]' \ 27 '::month' \ 28 ':year' 29