bug-datamash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH][RFC] Fix man page name given in --help output


From: Erik Auerswald
Subject: [PATCH][RFC] Fix man page name given in --help output
Date: Fri, 4 Jun 2021 09:37:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi,

the --help output of both GNU datamash and decorate mentions a
man page, but the man page name given is not completely correct.

For GNU datamash, the help output gives the command "man GNU datamash",
but the "man" program gives an error message for the "GNU" part
of this command:

$ datamash --help | grep 'man '
  man GNU datamash
$ man GNU datamash
No manual entry for GNU
$ man 'GNU datamash'
No manual entry for GNU datamash

For decorate, the help output uses argv[0] as the man page name:

$ ./decorate --help | grep ' man '
  man ./decorate

Using the man invocation given in decorate's help output results
in given the decorate executable to man, instead of the man page.

The attached patch fixes this by using the #define PROGRAM_NAME,
similar to what is used in GNU Coreutils, for both GNU datamash
and decorate.

I am not sure if this is completely correct, i.e., I do not know
how this interacts with "./configure --program-prefix=...".  But
it improves the current situation, and since neither datamash nor
decorate have common alternative implementations under the same
names, I expect that a program prefix (e.g., "g") is seldomly used,
if at all.

Please let me know what you think.

Thanks,
Erik

Attachment: datamash-decorate-help-fix_man_page_name.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]