From e6bcc1287bac0b040aa7347291333202e77af39a Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 18 Mar 2007 06:41:29 +0000 Subject: [PATCH] Ad a few words to clarify the operation of the GNU-specific double-colon feature, which allows options to have optional arguments. --- man3/getopt.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man3/getopt.3 b/man3/getopt.3 index dd2013db5a..565b8238b4 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -95,8 +95,9 @@ character is followed by a colon, the option requires an argument, so \fIargv\fP-element, or the text of the following \fIargv\fP-element, in .IR optarg . Two colons mean an option takes -an optional arg; if there is text in the current \fIargv\fP-element, -it is returned in \fIoptarg\fP, otherwise \fIoptarg\fP is set to zero. +an optional arg; if there is text in the current \fIargv\fP-element +(i.e., in the same word as the option name itself, for example, "-oarg"), +then it is returned in \fIoptarg\fP, otherwise \fIoptarg\fP is set to zero. This is a GNU extension. If .I optstring contains -- 2.47.2