[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] [PATCH] cmp, diff, diff3, sdiff: edit and align --he
From: |
Jim Meyering |
Subject: |
Re: [bug-diffutils] [PATCH] cmp, diff, diff3, sdiff: edit and align --help text. |
Date: |
Wed, 08 Jun 2011 15:54:57 +0200 |
Karl Berry wrote:
>
> * cmp.c (option_help_msgid, usage),
> * diff.c (option_help_msgid, usage),
> * diff3.c (option_help_msgid, usage),
> * sdiff.c (option_help_msgid, usage): align descriptions in the --help
> output and slightly edit content.
> ---
> src/cmp.c | 30 ++++++++------
> src/diff.c | 125 ++++++++++++++++++++++++++++++++--------------------------
> src/diff3.c | 49 ++++++++++++++++-------
> src/sdiff.c | 45 ++++++++++++---------
> 4 files changed, 146 insertions(+), 103 deletions(-)
>
> diff --git a/src/cmp.c b/src/cmp.c
> index f78f4f6..92b60bc 100644
> --- a/src/cmp.c
> +++ b/src/cmp.c
> @@ -158,15 +158,15 @@ check_stdout (void)
> }
>
> static char const * const option_help_msgid[] = {
> - N_("-b --print-bytes Print differing bytes."),
> - N_("-i SKIP --ignore-initial=SKIP Skip the first SKIP bytes of input."),
> - N_("-i SKIP1:SKIP2 --ignore-initial=SKIP1:SKIP2"),
> - N_(" Skip the first SKIP1 bytes of FILE1 and the first SKIP2 bytes of
> FILE2."),
> - N_("-l --verbose Output byte numbers and values of all differing
> bytes."),
> - N_("-n LIMIT --bytes=LIMIT Compare at most LIMIT bytes."),
> - N_("-s --quiet --silent Output nothing; yield exit status only."),
> - N_("-v --version Output version info."),
> - N_("--help Output this help."),
> + N_("-b, --print-bytes print differing bytes"),
> + N_("-i, --ignore-initial=SKIP skip first SKIP bytes of both
> inputs"),
> + N_("-i, --ignore-initial=SKIP1:SKIP2 skip first SKIP1 bytes of FILE1
> and\n"
> + " first SKIP2 bytes of FILE2"),
> + N_("-l, --verbose output byte numbers and differing byte
> values"),
> + N_("-n, --bytes=LIMIT compare at most LIMIT bytes"),
> + N_("-s, --quiet, --silent suppress all normal output"),
> + N_(" --help display this help and exit"),
> + N_("-v, --version output version information and exit"),
> 0
> };
Thanks for doing that. I've pushed those changes.
I too find that aligning makes it a easier to read.
For the record, here's the induced difference for sdiff --help:
(old, then new):
$ sdiff --help
Usage: sdiff [OPTION]... FILE1 FILE2
Side-by-side merge of file differences.
-o FILE --output=FILE Operate interactively, sending output to FILE.
-i --ignore-case Consider upper- and lower-case to be the same.
-E --ignore-tab-expansion Ignore changes due to tab expansion.
-b --ignore-space-change Ignore changes in the amount of white space.
-W --ignore-all-space Ignore all white space.
-B --ignore-blank-lines Ignore changes whose lines are all blank.
-I RE --ignore-matching-lines=RE Ignore changes whose lines all match RE.
--strip-trailing-cr Strip trailing carriage return on input.
-a --text Treat all files as text.
-w NUM --width=NUM Output at most NUM (default 130) print columns.
-l --left-column Output only the left column of common lines.
-s --suppress-common-lines Do not output common lines.
-t --expand-tabs Expand tabs to spaces in output.
--tabsize=NUM Tab stops are every NUM (default 8) print columns.
-d --minimal Try hard to find a smaller set of changes.
-H --speed-large-files Assume large files and many scattered small changes.
--diff-program=PROGRAM Use PROGRAM to compare files.
-v --version Output version info.
--help Output this help.
If a FILE is `-', read standard input.
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
Report bugs to: address@hidden
GNU diffutils home page: <http://www.gnu.org/software/diffutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
$ src/sdiff --help
Usage: src/sdiff [OPTION]... FILE1 FILE2
Side-by-side merge of differences between FILE1 and FILE2.
Mandatory arguments to long options are mandatory for short options too.
-o, --output=FILE operate interactively, sending output to FILE
-i, --ignore-case consider upper- and lower-case to be the same
-E, --ignore-tab-expansion ignore changes due to tab expansion
-b, --ignore-space-change ignore changes in the amount of white space
-W, --ignore-all-space ignore all white space
-B, --ignore-blank-lines ignore changes whose lines are all blank
-I, --ignore-matching-lines=RE ignore changes whose lines all match RE
--strip-trailing-cr strip trailing carriage return on input
-a, --text treat all files as text
-w, --width=NUM output at most NUM (default 130) print columns
-l, --left-column output only the left column of common lines
-s, --suppress-common-lines do not output common lines
-t, --expand-tabs expand tabs to spaces in output
--tabsize=NUM tab stops at every NUM (default 8) print columns
-d, --minimal try hard to find a smaller set of changes
-H, --speed-large-files assume large files, many scattered small changes
--diff-program=PROGRAM use PROGRAM to compare files
--help display this help and exit
-v, --version output version information and exit
If a FILE is `-', read standard input.
Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
Report bugs to: address@hidden
GNU diffutils home page: <http://www.gnu.org/software/diffutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>