Index: getopt_long.3 =================================================================== --- getopt_long.3 +++ getopt_long.3 @@ -31,7 +31,7 @@ .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd December 25, 2011 +.Dd January 31, 2018 .Dt GETOPT_LONG 3 .Os .Sh NAME @@ -213,6 +213,31 @@ .Ql \&? if the user specified an unknown or ambiguous option, and \-1 when the argument list has been exhausted. +Warnings about missing option arguments will be suppressed if a leading +.Ql \&: +is specified in +.Fa optstr . +.Pp +In addition to +.Ql \&: , +a leading +.Ql \&+ +or +.Ql \&- +in +.Fa optstr +also has special meaning. +A leading +.Ql \&+ +indicates that all non-option arguments should be permuted to the end of argv, +rather than halting processing at the first non-option argument. +A leading +.Ql \&- +indicates that all non-option arguments should be treated as if they are +arguments to a literal +.Ql \&1 +flag (i.e., the function call will return the value 1, rather than the char +literal '1'). .Sh ENVIRONMENT .Bl -tag -width ".Ev POSIXLY_CORRECT" .It Ev POSIXLY_CORRECT