diff --git a/man3/getopt.3 b/man3/getopt.3 index ce4c28088..315224c64 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -130,7 +130,7 @@ A legitimate option character is any visible one byte .BR ascii (7) character (for which .BR isgraph (3) -would return nonzero) that is not \(aq\-\(aq or \(aq:\(aq. +would return nonzero) that is not \(aq\-\(aq, \(aq:\(aq or \(aq;\(aq. If such a character is followed by a colon, the option requires an argument, so .BR getopt () @@ -166,6 +166,14 @@ If the first character of .B POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered. +If \(aq+\(aq is not the first character of +.IR optstring , +it is treated as a normal option. +If +.B POSIXLY_CORRECT +behaviour is required in this case +.I optstring +will contain two \(aq+\(aq symbols. If the first character of \fIoptstring\fP is \(aq\-\(aq, then each nonoption \fIargv\fP-element is handled as if it were the argument of an option with character code 1. (This is used by programs that were