Nicolas François [EMAIL PROTECTED] wrote:
help2man requires at least 2 spaces between the options and the
descriptions.
The generated man pages contain:
.TP
\fB\-\-strip\-trailing\-slashes\fR remove any trailing slashes from each
SOURCE
argument
instead of:
.TP
\fB\-\-strip\-trailing\-slashes\fR
remove any trailing slashes from each SOURCE argument
This causes a minor formatting issue (mostly on less than 80 columns
terminals or devices)
Thanks for the report and patch.
I've applied it upstream, for coreutils-6.x.
I spotted a few others, so added a `make distcheck' rule to ensure
that no more creep in. Here's the additional patch:
2006-02-06 Jim Meyering [EMAIL PROTECTED]
* src/unexpand.c (usage): Use two spaces (not one) to separate the
--first-only option string from its description, so help2man formats
the derived man page properly.
* src/rm.c (usage): Likewise for --no-preserve-root.
* src/chown.c (usage): Likewise.
* src/chgrp.c (usage): Likewise.
Add a rule to ensure that the above doesn't happen again.
* Makefile.maint (sc_two_space_separator_in_usage): New rule.
(syntax-check-rules): Add it.
* .x-sc_two_space_separator_in_usage: New empty file.
* Makefile.am (EXTRA_DIST): Add .x-sc_two_space_separator_in_usage.
2006-02-06 Jim Meyering [EMAIL PROTECTED]
* src/cp.c (usage): Use two spaces (not one) to separate each
option string from its description, so help2man formats the
derived man page properly.
* src/mv.c (usage): Likewise.
Patch from Nicolas François in http://bugs.debian.org/351601.
Index: Makefile.am
===
RCS file: /fetish/cu/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- Makefile.am 28 Dec 2005 10:26:58 - 1.20
+++ Makefile.am 6 Feb 2006 07:56:05 - 1.21
@@ -10,6 +10,7 @@ EXTRA_DIST = Makefile.cfg Makefile.maint
.x-sc_no_if_have_config_h \
.x-sc_require_config_h \
.x-sc_prohibit_assert_without_use \
+ .x-sc_two_space_separator_in_usage \
announce-gen \
build-aux/cvsu \
m4/ChangeLog \
Index: Makefile.maint
===
RCS file: /fetish/cu/Makefile.maint,v
retrieving revision 1.224
retrieving revision 1.225
diff -u -p -r1.224 -r1.225
--- Makefile.maint 6 Jan 2006 16:49:10 - 1.224
+++ Makefile.maint 6 Feb 2006 08:57:49 - 1.225
@@ -92,6 +92,7 @@ syntax-check-rules = \
sc_system_h_headers \
sc_tight_scope \
sc_trailing_blank \
+ sc_two_space_separator_in_usage \
sc_unmarked_diagnostics \
sc_useless_cpp_parens
@@ -275,6 +276,14 @@ sc_trailing_blank:
{ echo '$(ME): found trailing blank(s)' \
12; exit 1; } || :
+sc_two_space_separator_in_usage:
+ @( $(CVS_LIST) ) /dev/null 21 || :\
+ grep '^ *--[a-z][0-9A-Za-z-]* [^ ].*\\$$' \
+ $$($(CVS_LIST) | grep 'src/.*\.c$$' | grep -vEf .x-$@)\
+ { echo $(ME): help2man requires at least two spaces between; \
+ echo $(ME): an option and its description; \
+ 12; exit 1; } || :
+
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
Index: src/chgrp.c
===
RCS file: /fetish/cu/src/chgrp.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -p -r1.120 -r1.121
--- src/chgrp.c 30 May 2005 07:31:31 - 1.120
+++ src/chgrp.c 6 Feb 2006 08:00:23 - 1.121
@@ -124,7 +124,7 @@ With --reference, change the group of ea
ownership of a symlink)\n\
), stdout);
fputs (_(\
- --no-preserve-root do not treat `/' specially (the default)\n\
+ --no-preserve-root do not treat `/' specially (the default)\n\
--preserve-rootfail to operate recursively on `/'\n\
), stdout);
fputs (_(\
Index: src/chown.c
===
RCS file: /fetish/cu/src/chown.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -p -r1.124 -r1.125
--- src/chown.c 14 May 2005 07:58:36 - 1.124
+++ src/chown.c 6 Feb 2006 08:00:31 - 1.125
@@ -117,7 +117,7 @@ With --reference, change the owner and g
is not required for the omitted attribute.\n\
), stdout);
fputs (_(\
- --no-preserve-root do not treat `/' specially (the default)\n\
+ --no-preserve-root do not treat `/' specially (the default)\n\
--preserve-rootfail to operate recursively on `/'\n\
), stdout);
fputs (_(\
Index: src/rm.c
===
RCS file: