Re: [PATCH v2] man/man3/getopt_long.3: Assist users
From: Alejandro Colomar <alx@kernel.org>
Date: 2025-12-17 23:15:24
Attachments
- signature.asc [application/pgp-signature] 833 bytes
From: Alejandro Colomar <alx@kernel.org>
Date: 2025-12-17 23:15:24
Hi Branden, On Sat, Dec 13, 2025 at 07:37:54PM -0600, G. Branden Robinson wrote:
Throw a bone to users of this function who need to report (in a diagnostic message, for instance) the identity of an invalid long option name. Signed-off-by: "G. Branden Robinson" <redacted> --- man/man3/getopt_long.3 | 6 ++++++ 1 file changed, 6 insertions(+)diff --git a/man/man3/getopt_long.3 b/man/man3/getopt_long.3 index 73e8f3e6f..a464349fe 100644 --- a/man/man3/getopt_long.3 +++ b/man/man3/getopt_long.3@@ -102,6 +102,12 @@ .SH DESCRIPTION is not NULL, it points to a variable which is set to the index of the long option relative to .IR longopts . +.P +Its analogue to +.BR getopt (3)'s +.I optopt +is +.RI \[lq] "argv[(optind \- 1)]" \[rq].
Would you mind adding \% to the entire expression? Have a lovely night! Alex
.SH RETURN VALUE See .BR getopt (3). -- 2.30.2
-- <https://www.alejandro-colomar.es>