summaryrefslogtreecommitdiff
path: root/man/help2man
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-20 10:03:53 +0000
committerJim Meyering <jim@meyering.net>2004-04-20 10:03:53 +0000
commita378497e2bd766f4a8eecca9bd07dd3b9b31d23e (patch)
treee53d6aca324dfa07115782baa50bcf979a25a643 /man/help2man
parent9d77d864e7beb9cc494bd780ed3e7b3919a192ac (diff)
downloadcoreutils-a378497e2bd766f4a8eecca9bd07dd3b9b31d23e.tar.xz
Accept new option: --program-name=NAME, so that we
can override the one in --version output. This is needed solely so that test.1 doesn't refer to `[' as the program name. Reported by Benjamin Cutler as http://bugs.debian.org/205251.
Diffstat (limited to 'man/help2man')
-rwxr-xr-xman/help2man6
1 files changed, 6 insertions, 0 deletions
diff --git a/man/help2man b/man/help2man
index 2507a7913..21109e804 100755
--- a/man/help2man
+++ b/man/help2man
@@ -78,6 +78,8 @@ my $help_info = sprintf _(<<'EOT'), $this_program, $this_program;
Usage: %s [OPTION]... EXECUTABLE
+ --program_name=STRING override any name found in output of
+ `EXECUTABLE --version'
-n, --name=STRING description for the NAME paragraph
-s, --section=SECTION section number for manual page (1, 6, 8)
-m, --manual=TEXT name of manual (User Commands, ...)
@@ -107,8 +109,10 @@ my $locale = 'C';
my $help_option = '--help';
my $version_option = '--version';
my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info);
+my $opt_program_name;
my %opt_def = (
+ 'program-name=s' => \$opt_program_name,
'n|name=s' => \$opt_name,
's|section=s' => \$section,
'm|manual=s' => \$manual,
@@ -279,6 +283,8 @@ else
}
$program =~ s!.*/!!;
+$opt_program_name
+ and $program = $opt_program_name;
# No info for `info' itself.
$opt_no_info = 1 if $program eq 'info';