]> git.ipfire.org Git - thirdparty/util-linux.git/commit
cal: fix --week use and colors
authorKarel Zak <kzak@redhat.com>
Mon, 20 May 2024 13:07:24 +0000 (15:07 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 20 May 2024 13:27:23 +0000 (15:27 +0200)
commitf9c0c1bf23e713c622239a68fd36d30a87574567
tree6bbc38829508cb356922a9995d1c9de31cf166fe
parentc731e9666597a923aabeeb040d563ccee36efd7e
cal: fix --week use and colors

* don't overwrite --week=<number> by the current date, default only
  to the current year, if the year is not specified

* introduce "weeks" color sequence to colorize all week numbers.

Note that the man page suggests using "weeknumber" to colorize all
week numbers, but the code only uses this sequence for the week
requested by the --week option. This commit maintains backward
compatibility, although it would be better to use "weeknumber" for all
week numbers and "weekwanted" for the desired week.

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/cal.1.adoc
misc-utils/cal.c