Enclosed as an attachment is a diff to apply the described changes to
src/readlink.c,
as obtained via 'git', 2019-05-08 11:13 PDT (sorry for no git version
number, but I'm
not that familiar with git; also, the file mtimes were that of the git
clone).
I changed only the order of the help text; I didn't think it was
necessary to change the
code dealing with option parsing.
-- Bruce Jerrick
On 5/6/19 11:49 AM, Eric Blake wrote:
> On 5/6/19 9:38 AM, Bruce Jerrick wrote:
>> The --canonicalize options in the readlink(1) man page would be much
>> easier to keep straight if they
>> were in least-to-most restrictive order, rather than alphabetic order.
>>
>> Here is a diff that changes it (to be applied to the uncompressed
>> /usr/share/man/man1/readlink.1.gz);
> readlink.1 is generated from 'readlink --help' output; the ultimate
> patch would have to be applied to src/readlink.c. Would you like to
> respin it against the latest coreutils.git and on the correct file, to
> make it easier to test your proposed patch?
>
--- src/readlink.c.orig 2019-05-08 11:13:33.604658741 -0700
+++ src/readlink.c 2019-05-08 11:22:31.071678813 -0700
@@ -63,6 +63,10 @@ usage (int status)
fputs (_("Print value of a symbolic link or canonical file name\n\n"),
stdout);
fputs (_("\
+ -m, --canonicalize-missing canonicalize by following every symlink in\n\
+ every component of the given name recursively,\
+\n\
+ without requirements on components existence\n\
-f, --canonicalize canonicalize by following every symlink in\n\
every component of the given name recursively;\
\n\
@@ -73,10 +77,6 @@ usage (int status)
all components must exist\n\
"), stdout);
fputs (_("\
- -m, --canonicalize-missing canonicalize by following every symlink in\n\
- every component of the given name recursively,\
-\n\
- without requirements on components existence\n\
-n, --no-newline do not output the trailing delimiter\n\
-q, --quiet\n\
-s, --silent suppress most error messages (on by default)\n\