summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbcr <bcr@FreeBSD.org>2010-07-07 17:44:09 +0000
committerbcr <bcr@FreeBSD.org>2010-07-07 17:44:09 +0000
commit2449809d828b5150d531d1e687e6611bf8328117 (patch)
tree01f06cb7537dad44886f81dc839325ba524de1c0 /usr.bin
parent3d4e04519cdf048dcfa3c03765e61dfb3075fe6e (diff)
downloadFreeBSD-src-2449809d828b5150d531d1e687e6611bf8328117.zip
FreeBSD-src-2449809d828b5150d531d1e687e6611bf8328117.tar.gz
Fix an error in the EXAMPLES section of getopt(1), which is based on
the same fix present in NetBSD. Note: the getopt man page contains more antique information like this. An overhaul of the man page and/or sync with NetBSD would be the right thing to do. But since this is out of the scope of the PR, I'll leave it as it is for now. PR: docs/133118 Submitted by: Oleg A. Mamontov (oleg at mamontov dot net) Discussed with: jilles@ MFC after: 2 weeks
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/getopt/getopt.16
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/getopt/getopt.1 b/usr.bin/getopt/getopt.1
index 771a2e7..eafdce1 100644
--- a/usr.bin/getopt/getopt.1
+++ b/usr.bin/getopt/getopt.1
@@ -1,6 +1,6 @@
.\" $FreeBSD$
.\"
-.Dd April 3, 1999
+.Dd July 7, 2010
.Dt GETOPT 1
.Os
.Sh NAME
@@ -64,9 +64,9 @@ set \-\- $args
# You cannot use the set command with a backquoted getopt directly,
# since the exit code from getopt would be shadowed by those of set,
# which is zero by definition.
-for i
+while true;
do
- case "$i"
+ case "$1"
in
\-a|\-b)
echo flag $i set; sflags="${i#-}$sflags";
OpenPOWER on IntegriCloud