Index | Thread | Search

From:
Johannes Thyssen Tishman <jtt@openbsd.org>
Subject:
cal's -y flag usage
To:
tech@openbsd.org
Date:
Thu, 25 Jun 2026 09:13:44 +0000

Download raw body.

Thread
  • Johannes Thyssen Tishman:

    cal's -y flag usage

While playing with cal I noticed that using the -y flag along with a
single non-numerical argument or with two arguments would essentially
cause the option to be ignored:

$ cal -y jun
$ cal -y jun 2026
$ cal -y 06 2026

All three commands output the calendar for June 2026 instead of the
entire year. Before I try to patch this, is this the desired/intended
behaviour?

In case a change is desired, would it make sense to split the SYNOPSIS
in the man page into two lines? E.g.:

cal [-jmw] [month] [year]
cal [-jmwy] [year]