diff options
author | 2019-07-18 15:32:50 +0000 | |
---|---|---|
committer | 2019-07-18 15:32:50 +0000 | |
commit | fa28c5e548478b495d329af6c35709777dc7fe57 (patch) | |
tree | 7dd9ea38a0b5c2c0d42d3d139af5a5250e07de3a | |
parent | new test for an empty text block; from rea@ via bapt@ (FreeBSD) (diff) | |
download | wireguard-openbsd-fa28c5e548478b495d329af6c35709777dc7fe57.tar.xz wireguard-openbsd-fa28c5e548478b495d329af6c35709777dc7fe57.zip |
Delete documentation of --max-count, which is merely an alias of
the documented -m. As a rule, we only document long options when
users can't avoid them because they lack a short version.
As suggested by tedu@, as an exception, leave --context documented
because -C is awkward in so far as it takes an optional option
argument, which is fragile and error-prone and hence generally
discouraged, including by POSIX.
Two years ago, kettenis@, deraadt@, and tedu@ all agreed that this
is what should be done, and jmc@ was happy to accept the direction,
but somehow everybody forgot to commit.
-rw-r--r-- | usr.bin/grep/grep.1 | 7 | ||||
-rw-r--r-- | usr.bin/grep/grep.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/grep/grep.1 b/usr.bin/grep/grep.1 index b77011981ed..6ea1ad7bd83 100644 --- a/usr.bin/grep/grep.1 +++ b/usr.bin/grep/grep.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: grep.1,v 1.46 2019/07/17 04:24:20 tedu Exp $ +.\" $OpenBSD: grep.1,v 1.47 2019/07/18 15:32:50 schwarze Exp $ .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -28,7 +28,7 @@ .\" .\" @(#)grep.1 8.3 (Berkeley) 4/18/94 .\" -.Dd $Mdocdate: July 17 2019 $ +.Dd $Mdocdate: July 18 2019 $ .Dt GREP 1 .Os .Sh NAME @@ -48,7 +48,6 @@ .Op Fl -binary-files Ns = Ns Ar value .Op Fl -context Ns Op = Ns Ar num .Op Fl -line-buffered -.Op Fl -max-count Ns = Ns Ar num .Op Ar pattern .Op Ar .Ek @@ -220,7 +219,7 @@ Pathnames are listed once per file searched. If the standard input is searched, the string .Dq (standard input) is written. -.It Fl m Ar num , Fl -max-count Ns = Ns Ar count +.It Fl m Ar num Stop after .Ar num matches. diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 8b7d2b932b7..651a3b15002 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grep.c,v 1.59 2019/01/31 01:30:46 tedu Exp $ */ +/* $OpenBSD: grep.c,v 1.60 2019/07/18 15:32:50 schwarze Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -114,7 +114,7 @@ usage(void) #endif " [-e pattern]\n" "\t[-f file] [-m num] [--binary-files=value] [--context[=num]]\n" - "\t[--line-buffered] [--max-count=num] [pattern] [file ...]\n", + "\t[--line-buffered] [pattern] [file ...]\n", __progname); exit(2); } |