[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#351601: coreutils: minor formatting issue in the mv an cp manpag
From: |
Jim Meyering |
Subject: |
Re: Bug#351601: coreutils: minor formatting issue in the mv an cp manpages |
Date: |
Mon, 06 Feb 2006 10:08:45 +0100 |
Nicolas François <address@hidden> 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 <address@hidden>
* 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 <address@hidden>
* 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 -0000 1.20
+++ Makefile.am 6 Feb 2006 07:56:05 -0000 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 -0000 1.224
+++ Makefile.maint 6 Feb 2006 08:57:49 -0000 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)' \
1>&2; exit 1; } || :
+sc_two_space_separator_in_usage:
+ @( $(CVS_LIST) ) > /dev/null 2>&1 || : && \
+ 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"; \
+ 1>&2; 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 -0000 1.120
+++ src/chgrp.c 6 Feb 2006 08:00:23 -0000 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-root fail 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 -0000 1.124
+++ src/chown.c 6 Feb 2006 08:00:31 -0000 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-root fail to operate recursively on `/'\n\
"), stdout);
fputs (_("\
Index: src/rm.c
===================================================================
RCS file: /fetish/cu/src/rm.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -p -r1.137 -r1.138
--- src/rm.c 3 Dec 2005 22:23:09 -0000 1.137
+++ src/rm.c 6 Feb 2006 08:00:39 -0000 1.138
@@ -141,7 +141,7 @@ Remove (unlink) the FILE(s).\n\
-i, --interactive prompt before any removal\n\
"), stdout);
fputs (_("\
- --no-preserve-root do not treat `/' specially (the default)\n\
+ --no-preserve-root do not treat `/' specially (the default)\n\
--preserve-root fail to operate recursively on `/'\n\
-r, -R, --recursive remove directories and their contents recursively\n\
-v, --verbose explain what is being done\n\
Index: src/unexpand.c
===================================================================
RCS file: /fetish/cu/src/unexpand.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -p -r1.96 -r1.97
--- src/unexpand.c 24 Oct 2005 07:28:39 -0000 1.96
+++ src/unexpand.c 6 Feb 2006 07:58:53 -0000 1.97
@@ -132,7 +132,7 @@ Mandatory arguments to long options are
"), stdout);
fputs (_("\
-a, --all convert all blanks, instead of just initial blanks\n\
- --first-only convert only leading sequences of blanks (overrides -a)\n\
+ --first-only convert only leading sequences of blanks (overrides -a)\n\
-t, --tabs=N have tabs N characters apart instead of 8 (enables -a)\n\
-t, --tabs=LIST use comma separated LIST of tab positions (enables -a)\n\
"), stdout);
- Re: Bug#351601: coreutils: minor formatting issue in the mv an cp manpages,
Jim Meyering <=