Hello, On 2017-10-11 12:58 AM, Bernhard Voelker wrote: > Adding a bit more context (-A1) to the grep command helps: > > $ man man/stat.1 | grep -A1 Full > Full documentation at: <http://www.gnu.org/software/coreutils/stat> > or available locally via: info '(coreutils) stat invocation' > > I personally prefer 'pinfo' over 'info' as reader.
Perhaps there is some merit in making the usage text more complete ? For example, "date --help" does show the exact output of --iso-8601, --rfc-2822 and --rfc-3339 . Attached are two draft patches, one adds the information at the end of the "--help" screen, the other inside the "--terse" parameter. (these will also be propagated to the man-pages). What do you think ? regards, - assaf
>From c3a1564093dab6b2660969edb06f65f7c9655e80 Mon Sep 17 00:00:00 2001 From: Assaf Gordon <assafgor...@gmail.com> Date: Mon, 9 Oct 2017 18:36:24 -0600 Subject: [PATCH] stat: update usage with --terse FORMAT (at end of usage) --- src/stat.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stat.c b/src/stat.c index e505de7..e62afc1 100644 --- a/src/stat.c +++ b/src/stat.c @@ -1571,6 +1571,14 @@ Valid format sequences for file systems:\n\ %t file system type in hex\n\ %T file system type in human readable form\n\ "), stdout); + + fputs (_("\n\ +--terse is equivalent to the following FORMAT:\n\ + %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o %C\n\ +\n\ +--terse --file-system is equivalent to the following FORMAT:\n\ + %n %i %l %t %s %S %b %f %a %c %d\n\ +"), stdout); printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME); emit_ancillary_info (PROGRAM_NAME); } -- 2.7.4
>From 5133450a061310373fbd7dacd6f7402970fcbf39 Mon Sep 17 00:00:00 2001 From: Assaf Gordon <assafgor...@gmail.com> Date: Mon, 9 Oct 2017 18:41:05 -0600 Subject: [PATCH] stat: update usage with --terse FORMAT (inlined in --terse) --- src/stat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/stat.c b/src/stat.c index e505de7..4f73fa4 100644 --- a/src/stat.c +++ b/src/stat.c @@ -1506,7 +1506,16 @@ Display file or file system status.\n\ --printf=FORMAT like --format, but interpret backslash escapes,\n\ and do not output a mandatory trailing newline;\n\ if you want a newline, include \\n in FORMAT\n\ - -t, --terse print the information in terse form\n\ +"), stdout); + fputs (_("\ + -t, --terse print the information in terse form;\n\ + without -f equivalent to FORMAT:\n\ + %n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o %C\n\ + with -f equivalent to FORMAT:\n\ + %n %i %l %t %s %S %b %f %a %c %d\n\ +"), stdout); + fputs (_("\ +\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); -- 2.7.4