git: a12b16f48f74 - main - date: Clean up synopses
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Nov 2021 13:09:41 UTC
The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=a12b16f48f747339ccae6dd80cc0c0c4ad5b7846 commit a12b16f48f747339ccae6dd80cc0c0c4ad5b7846 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-11-03 11:58:09 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-11-03 13:09:36 +0000 date: Clean up synopses MFC after: 3 days --- bin/date/date.1 | 49 +++++++++++++++++++++++++++++++++++-------------- bin/date/date.c | 6 +++--- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/bin/date/date.1 b/bin/date/date.1 index 05b180cceb2b..4e60d34c1f86 100644 --- a/bin/date/date.1 +++ b/bin/date/date.1 @@ -39,34 +39,55 @@ .Nm date .Nd display or set date and time .Sh SYNOPSIS +.\" Display time. .Nm -.Op Fl jnRu -.Op Fl r Ar seconds | Ar filename +.Op Fl nRu +.Op Fl I Ns Op Ar FMT +.Op Fl r Ar filename +.Op Fl r Ar seconds .Oo -.Fl v .Sm off +.Fl v .Op Cm + | - .Ar val Op Cm y | m | w | d | H | M | S .Sm on .Oc .Op Cm + Ns Ar output_fmt +.\" Set time with the default input format. .Nm -.Op Fl ju +.Op Fl jnRu +.Op Fl I Ns Op Ar FMT +.Oo .Sm off -.Op Oo Oo Oo Oo Ar cc Oc Ar yy Oc Ar mm Oc Ar dd Oc Ar HH -.Ar MM Op Ar .ss +.Fl v +.Op Cm + | - +.Ar val Op Cm y | m | w | d | H | M | S +.Sm on +.Oc +.Sm off +.Oo Oo Oo Oo Oo +.Ar cc Oc +.Ar yy Oc +.Ar mm Oc +.Ar dd Oc +.Ar HH +.Oc Ar MM Op Cm \&. Ar ss .Sm on -.Nm -.Op Fl jRu -.Fl f Ar input_fmt new_date .Op Cm + Ns Ar output_fmt +.\" Set time with the user-provided input format. .Nm -.Op Fl jnu +.Op Fl jnRu .Op Fl I Ns Op Ar FMT -.Op Fl f Ar input_fmt -.Op Fl r Ar ... -.Op Fl v Ar ... -.Op Ar new_date +.Oo +.Sm off +.Fl v +.Op Cm + | - +.Ar val Op Cm y | m | w | d | H | M | S +.Sm on +.Oc +.Fl f Ar input_fmt +.Ar new_date +.Op Cm + Ns Ar output_fmt .Sh DESCRIPTION When invoked without arguments, the .Nm diff --git a/bin/date/date.c b/bin/date/date.c index cde299f6de61..87f3dad28bd6 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -383,11 +383,11 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n", - "usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]", + "usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]", " " - "[-I[date | hours | minutes | seconds]]", + "[-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]", " " - "[-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]" + "[[[[[[cc]yy]mm]dd]HH]MM[.ss] | new_date] [+output_fmt]" ); exit(1); }