From 741f851bf61c884ea41eaee2c1a90d4cab99776f Mon Sep 17 00:00:00 2001 From: Bob Proulx Date: Mon, 20 Aug 2007 22:04:45 -0600 Subject: [PATCH] Clarify touch documentation of file arguments. * src/touch.c (usage): Improve wording of documentation regarding file argument handling and special handling of - argument. * doc/coreutils.texi (touch invocation): Likewise. Documentation problem reported by Vincent Lefevre. --- ChangeLog | 8 ++++++++ doc/coreutils.texi | 7 ++++--- src/touch.c | 7 +++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f188d75df..291b9f307b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-08-20 Bob Proulx + + Clarify touch documentation of file arguments. + * src/touch.c (usage): Improve wording of documentation regarding + file argument handling and special handling of - argument. + * doc/coreutils.texi (touch invocation): Likewise. + Documentation problem reported by Vincent Lefevre. + 2007-08-20 Paul Eggert * NEWS: The old cp -p bug affected coreutils releases before 6.0. diff --git a/doc/coreutils.texi b/doc/coreutils.texi index e3164a9506..800ca64cac 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -9271,10 +9271,11 @@ touch [@var{option}]@dots{} @var{file}@dots{} @end example @cindex empty files, creating -Any @var{file} that does not exist is created empty. +Any @var{file} argument that does not exist is created empty. -A @var{file} of @samp{-} causes @command{touch} to change the -times of the file associated with standard output. +A @var{file} argument string of @samp{-} is handled specially and +causes @command{touch} to change the times of the file associated with +standard output. @cindex permissions, for changing file timestamps If changing both the access and modification times to the current diff --git a/src/touch.c b/src/touch.c index 963e7ffb1f..2540558e55 100644 --- a/src/touch.c +++ b/src/touch.c @@ -233,6 +233,11 @@ usage (int status) fputs (_("\ Update the access and modification times of each FILE to the current time.\n\ \n\ +A FILE argument that does not exist is created empty.\n\ +\n\ +A FILE argument string of - is handled specially and causes touch to\n\ +change the times of the file associated with standard output.\n\ +\n\ "), stdout); fputs (_("\ Mandatory arguments to long options are mandatory for short options too.\n\ @@ -256,8 +261,6 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (_("\ \n\ Note that the -d and -t options accept different time-date formats.\n\ -\n\ -If a FILE is -, touch standard output.\n\ "), stdout); emit_bug_reporting_address (); } -- 2.47.2