summaryrefslogtreecommitdiffstats
path: root/usr.bin/getopt
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-10-22 21:56:11 +0000
committerjoerg <joerg@FreeBSD.org>1996-10-22 21:56:11 +0000
commitc91e5c56fddfb108e17b163e94c55db69f9fd58f (patch)
treef012b915df360d3dd9026dd913633eb35ab3ff38 /usr.bin/getopt
parent5371bc9b5c27652dfdba2f222e76d2eb54c2fe68 (diff)
downloadFreeBSD-src-c91e5c56fddfb108e17b163e94c55db69f9fd58f.zip
FreeBSD-src-c91e5c56fddfb108e17b163e94c55db69f9fd58f.tar.gz
Cleanup. Boldfaced dashes didn't print at all, also corrected a few
other mdoc(5) usage errors. Pointed out by: kuku@physik.rwth-aachen.de (Chris Kukulies)
Diffstat (limited to 'usr.bin/getopt')
-rw-r--r--usr.bin/getopt/getopt.118
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/getopt/getopt.1 b/usr.bin/getopt/getopt.1
index 50f375c..ebf1c65 100644
--- a/usr.bin/getopt/getopt.1
+++ b/usr.bin/getopt/getopt.1
@@ -5,12 +5,12 @@
.Nm getopt
.Nd parse command options
.Sh SYNOPSIS
-.Nm set \-\- \`getopt optstring $*\`
+.Nm set \-\- \`getopt Ar optstring $*\`
.Sh DESCRIPTION
.Nm Getopt
is used to break up options in command lines for easy parsing by
shell procedures, and to check for legal options.
-.Op Optstring
+.Ar Optstring
is a string of recognized option letters (see
.Xr getopt 3
);
@@ -18,27 +18,27 @@ if a letter is followed by a colon, the option
is expected to have an argument which may or may not be
separated from it by white space.
The special option
-.B \-\-
+.Ql \-\-
is used to delimit the end of the options.
.Nm Getopt
will place
-.B \-\-
+.Ql \-\-
in the arguments at the end of the options,
or recognize it if used explicitly.
The shell arguments
(\fB$1 $2\fR ...) are reset so that each option is
preceded by a
-.B \-
+.Ql \-
and in its own shell argument;
each option argument is also in its own shell argument.
.Sh EXAMPLE
The following code fragment shows how one might process the arguments
for a command that can take the options
-.Op a
+.Fl a
and
-.Op b ,
+.Fl b ,
and the option
-.Op o ,
+.Fl o ,
which requires an argument.
.Pp
.Bd -literal -offset indent
@@ -77,7 +77,7 @@ cmd \-a \-oarg \-\- file file
.Nm Getopt
prints an error message on the standard error output when it
encounters an option letter not included in
-.Op optstring .
+.Ar optstring .
.Sh HISTORY
Written by Henry Spencer, working from a Bell Labs manual page.
Behavior believed identical to the Bell version.
OpenPOWER on IntegriCloud