"Alfred M. Szmidt" <[EMAIL PROTECTED]> wrote:
>    But I'm sure there are plenty of other duplicate descriptions that
>    _should_ be factored.  Any such patch would be very welcome.
>
> I took a quick look, and the obvious things to factor are the
> descriptions for the common switches.  But I'm unsure if it is really
> worth the effort, a lot of the programs have similar options, but they
> all differ in some small detail.  Like -i/--interactive example you
> gave.  Anyway, patch and ChangeLog applied.  Note that it only
> "macrofies" <10 options.

Thank you!

I've merged those changes into the tree (still not available).
Other than resolving a conflict due to separation of -H and --si
in du (the meaning of -H will change), the only real change I made
was to not create a new file.  Here's the result:

2004-01-15  Alfred M. Szmidt  <[EMAIL PROTECTED]>

        Factor out some common options.
        * coreutils.texi (Common options): Define macros here.
        (What information is listed, cp invocation): Use the macro(s).
        (install invocation, mv invocation, ln invocation): Likewise.
        (df invocation, du invocation): Likewise.

Index: doc/coreutils.texi
===================================================================
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -p -u -r1.147 -r1.148
--- doc/coreutils.texi  9 Jan 2004 18:15:58 -0000       1.147
+++ doc/coreutils.texi  15 Jan 2004 10:58:47 -0000      1.148
@@ -495,6 +495,77 @@ insights to the overall process.
 @node Common options
 @chapter Common options
 
[EMAIL PROTECTED] optBackup
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{method}]}
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] --backup
[EMAIL PROTECTED] VERSION_CONTROL
[EMAIL PROTECTED] backups, making
[EMAIL PROTECTED] options}.
+Make a backup of each file that would otherwise be overwritten or removed.
[EMAIL PROTECTED] macro
+
[EMAIL PROTECTED] optBackupSuffix
[EMAIL PROTECTED] -S @var{suffix}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -S
[EMAIL PROTECTED] --suffix
+Append @var{suffix} to each backup file made with @option{-b}.
[EMAIL PROTECTED] options}.
[EMAIL PROTECTED] macro
+
[EMAIL PROTECTED] optTargetDirectory
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{directory}}
[EMAIL PROTECTED] --target-directory
[EMAIL PROTECTED] target directory
[EMAIL PROTECTED] destination directory
+Specify the destination @var{directory}.
[EMAIL PROTECTED] directory}.
[EMAIL PROTECTED] macro
+
[EMAIL PROTECTED] optSi
[EMAIL PROTECTED] --si
[EMAIL PROTECTED] --si
[EMAIL PROTECTED] SI output
+Append an SI-style abbreviation to each size, such as @samp{MB} for
+megabytes.  Powers of 1000 are used, not 1024; @samp{MB} stands for
+1,000,000 bytes.  This option is equivalent to
[EMAIL PROTECTED]  Use the @option{-h} or
[EMAIL PROTECTED] option if
+you prefer powers of 1024.
[EMAIL PROTECTED] macro
+
[EMAIL PROTECTED] optHumanReadable
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] human-readable output
+Append a size letter to each size, such as @samp{M} for mebibytes.
+Powers of 1024 are used, not 1000; @samp{M} stands for 1,048,576 bytes.
+Use the @option{--si} option if you prefer powers of 1000.
[EMAIL PROTECTED] macro
+
[EMAIL PROTECTED] optStripTrailingSlashes
[EMAIL PROTECTED] @[EMAIL PROTECTED]
[EMAIL PROTECTED] --strip-trailing-slashes
[EMAIL PROTECTED] stripping trailing slashes
+Remove any trailing slashes from each @var{source} argument.
[EMAIL PROTECTED] slashes}.
[EMAIL PROTECTED] macro
+
[EMAIL PROTECTED] optVersionControl
[EMAIL PROTECTED] -V @var{method}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -V
[EMAIL PROTECTED] --version-control
+Change the type of backups made with @option{-b}.  The @var{method}
+argument can be @samp{none} (or @samp{off}), @samp{numbered} (or
[EMAIL PROTECTED]), @samp{existing} (or @samp{nil}), or @samp{never} (or
[EMAIL PROTECTED]).  @xref{Backup options}.
[EMAIL PROTECTED] macro
+
 @cindex common options
 
 Certain options are available in all of these programs.  Rather than
@@ -5292,15 +5363,7 @@ Inhibit display of group information in 
 (This is the default in some [EMAIL PROTECTED] versions of @command{ls}, so we
 provide this option for compatibility.)
 
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] human-readable output
-Append a size letter to each size, such as @samp{M} for mebibytes.
-Powers of 1024 are used, not 1000; @samp{M} stands for 1,048,576 bytes.
-This option is equivalent to @option{--block-size=human} (@pxref{Block size}).
-Use the @option{--si} option if you prefer powers of 1000.
[EMAIL PROTECTED]
 
 @item -i
 @itemx --inode
@@ -5400,15 +5463,7 @@ systems, it reports sizes that are twice
 that are NFS-mounted from BSD systems.  This is due to a flaw in HP-UX;
 it also affects the HP-UX @command{ls} program.
 
[EMAIL PROTECTED] --si
[EMAIL PROTECTED] --si
[EMAIL PROTECTED] SI output
-Append an SI-style abbreviation to each size, such as @samp{MB} for
-megabytes.  Powers of 1000 are used, not 1024; @samp{MB} stands for
-1,000,000 bytes.  This option is equivalent to
[EMAIL PROTECTED]  Use the @option{-h} or
[EMAIL PROTECTED] option if
-you prefer powers of 1024.
[EMAIL PROTECTED]
 
 @end table
 
@@ -6289,11 +6344,7 @@ This is useful in creating a file for us
 since such a file must not have any holes.
 @end table
 
[EMAIL PROTECTED] @[EMAIL PROTECTED]
[EMAIL PROTECTED] --strip-trailing-slashes
[EMAIL PROTECTED] stripping trailing slashes
-Remove any trailing slashes from each @var{source} argument.
[EMAIL PROTECTED] slashes}.
[EMAIL PROTECTED]
 
 @item -s
 @itemx --symbolic-link
@@ -6305,19 +6356,9 @@ file names must be absolute (starting wi
 destination files are in the current directory.  This option merely
 results in an error message on systems that do not support symbolic links.
 
[EMAIL PROTECTED] -S @var{suffix}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -S
[EMAIL PROTECTED] --suffix
-Append @var{suffix} to each backup file made with @option{-b}.
[EMAIL PROTECTED] options}.
[EMAIL PROTECTED]
 
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{directory}}
[EMAIL PROTECTED] --target-directory
[EMAIL PROTECTED] target directory
[EMAIL PROTECTED] destination directory
-Specify the destination @var{directory}.
[EMAIL PROTECTED] directory}.
[EMAIL PROTECTED]
 
 @item -v
 @itemx --verbose
@@ -6325,14 +6366,7 @@ Specify the destination @var{directory}.
 @opindex --verbose
 Print the name of each file before copying it.
 
[EMAIL PROTECTED] -V @var{method}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -V
[EMAIL PROTECTED] --version-control
-Change the type of backups made with @option{-b}.  The @var{method}
-argument can be @samp{none} (or @samp{off}), @samp{numbered} (or
[EMAIL PROTECTED]), @samp{existing} (or @samp{nil}), or @samp{never} (or
[EMAIL PROTECTED]).  @xref{Backup options}.
[EMAIL PROTECTED]
 
 @item -x
 @itemx --one-file-system
@@ -6551,14 +6585,7 @@ The program accepts the following option
 
 @table @samp
 
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{method}]}
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] --backup
[EMAIL PROTECTED] VERSION_CONTROL
[EMAIL PROTECTED] backups, making
[EMAIL PROTECTED] options}.
-Make a backup of each file that would otherwise be overwritten or removed.
[EMAIL PROTECTED]
 
 @item -c
 @opindex -c
@@ -6630,19 +6657,9 @@ to when they were last installed.
 @cindex stripping symbol table information
 Strip the symbol tables from installed binary executables.
 
[EMAIL PROTECTED] -S @var{suffix}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -S
[EMAIL PROTECTED] --suffix
-Append @var{suffix} to each backup file made with @option{-b}.
[EMAIL PROTECTED] options}.
[EMAIL PROTECTED]
 
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{directory}}
[EMAIL PROTECTED] --target-directory
[EMAIL PROTECTED] target directory
[EMAIL PROTECTED] destination directory
-Specify the destination @var{directory}.
[EMAIL PROTECTED] directory}.
[EMAIL PROTECTED]
 
 @item -v
 @itemx --verbose
@@ -6650,14 +6667,7 @@ Specify the destination @var{directory}.
 @opindex --verbose
 Print the name of each file before copying it.
 
[EMAIL PROTECTED] -V @var{method}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -V
[EMAIL PROTECTED] --version-control
-Change the type of backups made with @option{-b}.  The @var{method}
-argument can be @samp{none} (or @samp{off}), @samp{numbered} (or
[EMAIL PROTECTED]), @samp{existing} (or @samp{nil}), or @samp{never} (or
[EMAIL PROTECTED]).  @xref{Backup options}.
[EMAIL PROTECTED]
 
 @end table
 
@@ -6712,14 +6722,7 @@ The program accepts the following option
 
 @table @samp
 
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{method}]}
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] --backup
[EMAIL PROTECTED] VERSION_CONTROL
[EMAIL PROTECTED] backups, making
[EMAIL PROTECTED] options}.
-Make a backup of each file that would otherwise be overwritten or removed.
[EMAIL PROTECTED]
 
 @item -f
 @itemx --force
@@ -6760,34 +6763,13 @@ same or newer modification time.
 @opindex --verbose
 Print the name of each file before moving it.
 
[EMAIL PROTECTED] @[EMAIL PROTECTED]
[EMAIL PROTECTED] --strip-trailing-slashes
[EMAIL PROTECTED] stripping trailing slashes
-Remove any trailing slashes from each @var{source} argument.
[EMAIL PROTECTED] slashes}.
[EMAIL PROTECTED]
 
[EMAIL PROTECTED] -S @var{suffix}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -S
[EMAIL PROTECTED] --suffix
-Append @var{suffix} to each backup file made with @option{-b}.
[EMAIL PROTECTED] options}.
[EMAIL PROTECTED]
 
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{directory}}
[EMAIL PROTECTED] --target-directory
[EMAIL PROTECTED] target directory
[EMAIL PROTECTED] destination directory
-Specify the destination @var{directory}.
[EMAIL PROTECTED] directory}.
[EMAIL PROTECTED]
 
[EMAIL PROTECTED] -V @var{method}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -V
[EMAIL PROTECTED] --version-control
-Change the type of backups made with @option{-b}.  The @var{method}
-argument can be @samp{none} (or @samp{off}), @samp{numbered} (or
[EMAIL PROTECTED]), @samp{existing} (or @samp{nil}), or @samp{never} (or
[EMAIL PROTECTED]).  @xref{Backup options}.
[EMAIL PROTECTED]
 
 @end table
 
@@ -7244,14 +7226,7 @@ The program accepts the following option
 
 @table @samp
 
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{method}]}
[EMAIL PROTECTED] -b
[EMAIL PROTECTED] --backup
[EMAIL PROTECTED] VERSION_CONTROL
[EMAIL PROTECTED] backups, making
[EMAIL PROTECTED] options}.
-Make a backup of each file that would otherwise be overwritten or removed.
[EMAIL PROTECTED]
 
 @item -d
 @itemx -F
@@ -7302,19 +7277,9 @@ just like a directory.
 Make symbolic links instead of hard links.  This option merely produces
 an error message on systems that do not support symbolic links.
 
[EMAIL PROTECTED] -S @var{suffix}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -S
[EMAIL PROTECTED] --suffix
-Append @var{suffix} to each backup file made with @option{-b}.
[EMAIL PROTECTED] options}.
[EMAIL PROTECTED]
 
[EMAIL PROTECTED] @[EMAIL PROTECTED]@var{directory}}
[EMAIL PROTECTED] --target-directory
[EMAIL PROTECTED] target directory
[EMAIL PROTECTED] destination directory
-Specify the destination @var{directory}.
[EMAIL PROTECTED] directory}.
[EMAIL PROTECTED]
 
 @item -v
 @itemx --verbose
@@ -7322,14 +7287,7 @@ Specify the destination @var{directory}.
 @opindex --verbose
 Print the name of each file before linking it.
 
[EMAIL PROTECTED] -V @var{method}
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] -V
[EMAIL PROTECTED] --version-control
-Change the type of backups made with @option{-b}.  The @var{method}
-argument can be @samp{none} (or @samp{off}), @samp{numbered} (or
[EMAIL PROTECTED]), @samp{existing} (or @samp{nil}), or @samp{never} (or
[EMAIL PROTECTED]).  @xref{Backup options}.
[EMAIL PROTECTED]
 
 @end table
 
@@ -8257,24 +8215,11 @@ only included if this option is specifie
 Scale sizes by @var{size} before printing them (@pxref{Block size}).
 For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes.
 
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] human-readable output
-Append a size letter to each size, such as @samp{M} for mebibytes.
-Powers of 1024 are used, not 1000; @samp{M} stands for 1,048,576 bytes.
-Use the @option{-H} or @option{--si} option if you prefer powers of 1000.
[EMAIL PROTECTED]
 
 @item -H
[EMAIL PROTECTED] --si
 @opindex -H
[EMAIL PROTECTED] --si
[EMAIL PROTECTED] SI output
-Append an SI-style abbreviation to each size, such as @samp{MB} for
-megabytes.  Powers of 1000 are used, not 1024; @samp{MB} stands for
-1,000,000 bytes.  Use the @option{-h} or @option{--human-readable} option if
-you prefer powers of 1024.
+Equivalent to @option{--si}.
 
 @item -i
 @itemx --inodes
@@ -8330,6 +8275,8 @@ some network mounts), the columns are mi
 The labels in the header output line are changed to conform to @acronym{POSIX}.
 @end enumerate
 
[EMAIL PROTECTED]
+
 @item --sync
 @opindex --sync
 @cindex filesystem space, retrieving current data more slowly
@@ -8485,14 +8432,7 @@ Does not affect other symbolic links.  T
 out the disk usage of directories, such as @file{/usr/tmp}, which
 are often symbolic links.
 
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] -h
[EMAIL PROTECTED] --human-readable
[EMAIL PROTECTED] human-readable output
-Append a size letter to each size, such as @samp{M} for mebibytes.
-Powers of 1024 are used, not 1000; @samp{M} stands for 1,048,576 bytes.
-Use the @option{--si} option if you prefer powers of 1000.
[EMAIL PROTECTED]
 
 @item -H
 @opindex -H



_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to