From 19165c59092d434f3e58428256240d01c5cafba2 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Wed, 23 Mar 2011 02:52:14 +0200
Subject: [PATCH] xargs/xargs.1: Order options like in GNU cp(1).
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

* items in alphabetical order
* Preset in format '-o, --option" like in other GNU manual pages.
* Put --help and --verbose options last as in GNU manual pages.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 xargs/xargs.1 |  166 +++++++++++++++++++++++++--------------------------------
 1 files changed, 72 insertions(+), 94 deletions(-)

diff --git a/xargs/xargs.1 b/xargs/xargs.1
index f490b79..77b4fc8 100644
--- a/xargs/xargs.1
+++ b/xargs/xargs.1
@@ -88,25 +88,10 @@ If any invocation of the command exits with a status of 255,
 will stop immediately without reading any further input.  An error
 message is issued on stderr when this happens.
 .SH OPTIONS
-.TP
-.PD 0
-.BI "\-\-arg\-file=" file
-.TP
-.PD 0
-.BI "\-a " file
-Read items from
-.I file
-instead of standard input.  If you use this option, stdin remains
-unchanged when commands are run.  Otherwise, stdin is redirected
-from
-.IR /dev/null .
 
 .TP
 .PD 0
-.B \-\-null
-.TP
-.PD
-.B \-0
+.B \-0, \-\-null
 Input items are terminated by a null character instead of by
 whitespace, and the quotes and backslash are not special (every
 character is taken literally).  Disables the end of file string, which
@@ -116,10 +101,17 @@ contain white space, quote marks, or backslashes.  The GNU find
 
 .TP
 .PD 0
-.BI "\-\-delimiter=" delim
+.BI "\-a " file, " \-\-arg\-file=" file
+Read items from
+.I file
+instead of standard input.  If you use this option, stdin remains
+unchanged when commands are run.  Otherwise, stdin is redirected
+from
+.IR /dev/null .
+
 .TP
-.PD
-.BI \-d " delim"
+.PD 0
+.BI \-d " delim" ", \-\-delimiter=" delim
 Input items are terminated by the specified character.  Quotes and
 backslash are not special; every character in the input is taken
 literally.  Disables the end-of-file string, which is treated like any
@@ -145,12 +137,10 @@ If neither
 nor
 .B \-e
 is used, no end of file string is used.
+
 .TP
 .PD 0
-.BR "\-\-eof" [\fI=eof-str\fR]
-.TP
-.PD
-.BR \-e [ \fIeof-str\fR]
+.BR \-e [\fIeof-str\fR] ", \-\-eof" [\fI=eof-str\fR]
 This option is a synonym for the
 .B \-E
 option.  Use
@@ -162,11 +152,7 @@ because it is POSIX compliant while this option is not.  If
 nor
 .B \-e
 is used, no end of file string is used.
-.TP
-.B "\-\-help"
-Print a summary of the options to
-.B xargs
-and exit.
+
 .TP
 .BI \-I " replace-str"
 Replace occurrences of \fIreplace-str\fR in the initial-arguments with
@@ -177,12 +163,10 @@ Implies
 and
 .B \-L
 1.
+
 .TP
 .PD 0
-.BR "\-\-replace" [\fI=replace-str\fR]
-.TP
-.PD
-.BR  \-i "[\fIreplace-str\fR]"
+.BR \-i "[\fIreplace-str\fR]" ", \-\-replace" [\fI=replace-str\fR]
 This option is a synonym for
 .BI \-I replace-str
 if
@@ -194,18 +178,17 @@ argument is missing, the effect is the same as
 This option is deprecated; use
 .B \-I
 instead.
+
 .TP
 .BI \-L " max-lines"
 Use at most \fImax-lines\fR nonblank input lines per command line.
 Trailing blanks cause an input line to be logically continued on the
 next input line.  Implies
 .BR \-x .
+
 .TP
 .PD 0
-.BR \-\-max-lines "[=\fImax-lines\fR]"
-.TP
-.PD
-.BR \-l "[\fImax-lines\fR]"
+.BR \-l "[\fImax-lines\fR]" ", \-\-max-lines" "[=\fImax-lines\fR]"
 Synonym for the
 .B \-L
 option.  Unlike
@@ -219,12 +202,10 @@ is not specified, it defaults to one.  The
 option is deprecated since the POSIX standard specifies
 .B \-L
 instead.
+
 .TP
 .PD 0
-.BR "\-\-max\-args" =\fImax-args\fR
-.TP
-.PD
-.BI \-n " max-args"
+.BR \-n " max-args" ", \-\-max\-args" =\fImax-args\fR
 Use at most \fImax-args\fR arguments per command line.  Fewer than
 .I max-args
 arguments will be used if the size (see the
@@ -233,31 +214,53 @@ option) is exceeded, unless the
 .B \-x
 option is given, in which case
 .B xargs will exit.
+
 .TP
 .PD 0
-.B \-\-interactive
-.TP
-.PD
-.B \-p
+.B \-P, \-\-interactive
 Prompt the user about whether to run each command line and read a line
 from the terminal.  Only run the command line if the response starts
 with `y' or `Y'.  Implies
 .BR -t .
+
 .TP
 .PD 0
-.B \-\-no\-run\-if\-empty
+.BR \-P " max-procs" ", \-\-max\-procs" "=\fImax-procs\fR"
+Run up to
+.I max-procs
+processes at a time; the default is 1.  If
+.I max-procs
+is 0,
+.B xargs
+will run as many processes as
+possible at a time.  Use the
+.B \-n
+option or the
+.B \-L
+option with
+.BR \-P ;
+otherwise chances are that only one exec will be done.
+While
+.B xargs
+is running, you can
+send its process
+a SIGUSR1 signal to increase the number of commands to run simultaneously,
+or a SIGUSR2 to decrease the number.  You cannot decrease it below 1.
+.B xargs
+never terminates its commands; when asked to decrease, it merely
+waits for more than one existing command to terminate before starting
+another.
+
 .TP
-.PD
-.B \-r
+.PD 0
+.B \-r, \-\-no\-run\-if\-empty
 If the standard input does not contain any nonblanks, do not run the
 command.  Normally, the command is run once even if there is no input.
 This option is a GNU extension.
+
 .TP
 .PD 0
-.BR \-\-max\-chars "=\fImax-chars\fR"
-.TP
-.PD
-.BI \-s " max-chars"
+.BR \-s " max-chars" ", \-\-max\-chars" "=\fImax-chars\fR"
 Use at most \fImax-chars\fR characters per command line, including the
 command and initial-arguments and the terminating nulls at the ends of
 the argument strings.  The largest allowed value is system-dependent,
@@ -267,19 +270,7 @@ more than 128KiB, 128Kib is used as the default value; otherwise, the
 default value is the maximum.  1KiB is 1024 bytes.
 .B xargs
 automatically adapts to tighter constraints.
-.TP
-.PD 0
-.B \-\-verbose
-.TP
-.PD
-.B \-t
-Print the command line on the standard error output before executing
-it.
-.TP
-.B "\-\-version"
-Print the version number of
-.B xargs
-and exit.
+
 .TP
 .B "\-\-show\\-limits"
 Display the limits on the command-line length which are imposed by the
@@ -294,45 +285,32 @@ option.  Pipe the input from
 if you don't want
 .B xargs
 to do anything.
+
 .TP
 .PD 0
-.B \-\-exit
+.B \-t, \-\-verbose
+Print the command line on the standard error output before executing
+it.
+
 .TP
-.PD
-.B \-x
+.PD 0
+.B \-x, \-\-exit
 Exit if the size (see the
 .B \-s
 option) is exceeded.
+
 .TP
-.PD 0
-.BR \-\-max\-procs "=\fImax-procs\fR"
-.TP
-.PD
-.BI \-P " max-procs"
-Run up to
-.I max-procs
-processes at a time; the default is 1.  If
-.I max-procs
-is 0,
-.B xargs
-will run as many processes as
-possible at a time.  Use the
-.B \-n
-option or the
-.B \-L
-option with
-.BR \-P ;
-otherwise chances are that only one exec will be done.
-While
+.B "\-\-help"
+Print a summary of the options to
 .B xargs
-is running, you can
-send its process
-a SIGUSR1 signal to increase the number of commands to run simultaneously,
-or a SIGUSR2 to decrease the number.  You cannot decrease it below 1.
+and exit.
+
+.TP
+.B "\-\-version"
+Print the version number of
 .B xargs
-never terminates its commands; when asked to decrease, it merely
-waits for more than one existing command to terminate before starting
-another.
+and exit.
+
 .SH "EXAMPLES"
 .nf
 .B find /tmp \-name core \-type f \-print | xargs /bin/rm \-f
-- 
1.7.2.3

