Control: reopen -1
Control: retitle -1 bsdmainutils: incomplete cal(1) man page

On 2016-03-12 11:01:46 +0100, Michael Meskes wrote:
> On Sat, Mar 12, 2016 at 04:32:11AM +0100, Vincent Lefevre wrote:
> > According to the cal(1) man page:
> > 
> >      -M      Weeks start on Monday.
> > 
> >      -S      Weeks start on Sunday.
> 
> Please check the synopsis too:
> 
> cal [-31jy] [-A number] [-B number] [-d yyyy-mm] [[month] year]
> cal [-31j] [-A number] [-B number] [-d yyyy-mm] -m month [year]
> ncal [-C31bhjJpwySM] [-A number] [-B number] [-H yyyy-mm-dd] [-d yyyy-mm]
>          [-s country_code] [[month] year]
> ncal [-C31bhJeoSM] [-A number] [-B number] [-d yyyy-mm] [year]
> 
> As you can see no -S or -M listed with cal.

The synopsis in a man page is not meant to list all options.
Sometimes, only the main options are listed. Actually this is even
the case here. For instance:

$ cal --help
cal: invalid option -- '-'
Usage: cal [general options] [-hjy] [[month] year]
       cal [general options] [-hj] [-m month] [year]
       ncal [general options] [-bhJjpwySM] [-s country_code] [[month] year]
       ncal [general options] [-bhJeoSM] [year]
General options: [-NC31] [-A months] [-B months]
For debug the highlighting: [-H yyyy-mm-dd] [-d yyyy-mm]

So, it appears that there is an option -N valid for cal, but not
listed in the synopsis (though listed in the description).

Moreover, contrary to what the synopsis and Usage output say,
"ncal -ej" is invalid. But it doesn't return any error.

Even if the synopsis is completed, the description should say that
not all options apply to cal and one should refer to the synopsis
(if completed).

Also, the synopsis is not very clear. For instance:

$ ncal -CJ
Usage: cal [general options] [-hjy] [[month] year]
       cal [general options] [-hj] [-m month] [year]
       ncal [general options] [-bhJjpwySM] [-s country_code] [[month] year]
       ncal [general options] [-bhJeoSM] [year]
General options: [-NC31] [-A months] [-B months]
For debug the highlighting: [-H yyyy-mm-dd] [-d yyyy-mm]

If I understand correctly, it should say something like on separate
lines:

  cal -N [ncal options and arguments]
  ncal -C [cal options and arguments]

BTW, in the Usage output, shouldn't the options -h and -j be moved
to the general options?

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to