From 56783caccffc316da47347e4e71029c5a685184f Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Sun, 24 Jul 2022 20:49:29 +0100 Subject: [PATCH] doc: date: clarify which options are mutually exclusive * src/date.c (usage): Specify that --date, --file, --reference, and --resolution are mutually exclusive. This is also useful documentation to group similar options. * doc/coreutils.texi (Options for date): Likewise. Addresses https://bugs.gnu.org/55401 --- doc/coreutils.texi | 4 ++++ src/date.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index e0c87d1ad7..53257f7d9f 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -16426,6 +16426,10 @@ relative to Universal Time rather than to the local time zone. The program accepts the following options. Also see @ref{Common options}. Except for @option{-u}, these options are all GNU extensions to POSIX. +All options that specify the date to display are mutually exclusive. +I.e.: @option{--date}, @option{--file}, @option{--reference}, +@option{--resolution}. + @table @samp @item -d @var{datestr} diff --git a/src/date.c b/src/date.c index 7f2ac801d7..ff5c548c0b 100644 --- a/src/date.c +++ b/src/date.c @@ -183,6 +183,11 @@ With -s, or with [MMDDhhmm[[CC]YY][.ss]], set the date and time.\n\ fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ +All options that specify the date to display are mutually exclusive.\n\ +I.e.: --date, --file, --reference, --resolution.\n\ +"), stdout); + fputs (_("\ +\n\ FORMAT controls the output. Interpreted sequences are:\n\ \n\ %% a literal %\n\ -- 2.47.2