Thread (3 messages) 3 messages, 2 authors, 2025-12-07

Re: [PATCH] man/man3/getopt.3: Assist getopt_long() users

From: Alejandro Colomar <alx@kernel.org>
Date: 2025-12-07 16:37:31

On Sun, Dec 07, 2025 at 03:59:50PM +0100, Alejandro Colomar wrote:
Hi Branden,

On Sun, Dec 07, 2025 at 08:46:03AM -0600, G. Branden Robinson wrote:
quoted
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.3 | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/man/man3/getopt.3 b/man/man3/getopt.3
index 8495719af..432ea1252 100644
--- a/man/man3/getopt.3
+++ b/man/man3/getopt.3
@@ -300,6 +300,12 @@ .SS getopt_long() and getopt_long_only()
 points to a variable which is set to the index of the long option relative to
 .IR longopts .
 .P
+Its analogue to
+.BR getopt ()'s
+.I optopt
+is
+.RI \[lq] "argv[(optind \- 1)]" \[rq].
+.P
Ughhh, this page is too crowded already.  I'll split the _long* variants
into their own separate page.

I'll ping you once that's done, so that you can rebase this patch.
Done.


Cheers,
Alex

Have a lovely day!
Alex
quoted
 .BR getopt_long_only ()
 is like
 .BR getopt_long (),
-- 
2.30.2


-- 
<https://www.alejandro-colomar.es>


-- 
<https://www.alejandro-colomar.es>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help