Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/man Document -f option for man(1).



details:   https://anonhg.NetBSD.org/src/rev/d99ba37d4778
branches:  trunk
changeset: 345946:d99ba37d4778
user:      abhinav <abhinav%NetBSD.org@localhost>
date:      Thu Jun 16 15:10:58 2016 +0000

description:
Document -f option for man(1).
Also remove unsupported options for `man -k` from the synopsis and usage.

diffstat:

 usr.bin/man/man.1 |  20 ++++++++++++++------
 usr.bin/man/man.c |   7 ++++---
 2 files changed, 18 insertions(+), 9 deletions(-)

diffs (85 lines):

diff -r 8e95d129d23a -r d99ba37d4778 usr.bin/man/man.1
--- a/usr.bin/man/man.1 Thu Jun 16 14:51:56 2016 +0000
+++ b/usr.bin/man/man.1 Thu Jun 16 15:10:58 2016 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: man.1,v 1.28 2014/08/14 15:44:47 apb Exp $
+.\"    $NetBSD: man.1,v 1.29 2016/06/16 15:10:58 abhinav Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)man.1      8.2 (Berkeley) 1/2/94
 .\"
-.Dd August 14, 2014
+.Dd June 16, 2016
 .Dt MAN 1
 .Os
 .Sh NAME
@@ -49,10 +49,12 @@
 .Oc
 .Ar name Ar ...
 .Nm
-.Fl k
 .Op Fl C Ar file
-.Op Fl M Ar path
-.Op Fl m Ar path
+.Fl f
+.Ar command Ar ...
+.Nm
+.Op Fl C Ar file
+.Fl k
 .Ar keyword Ar ...
 .Nm
 .Fl p
@@ -82,6 +84,12 @@
 .Xr more 1
 to paginate it.
 This is done by default if the standard output is not a terminal device.
+.It Fl f
+Synonym for
+.Xr whatis 1 .
+It searches man pages for
+.Ar command
+in their names and displays header lines from all matching pages.
 .It Fl h
 Display only the
 .Dq Tn SYNOPSIS
@@ -90,7 +98,7 @@
 For library functions, this usually contains the required include
 files and function prototypes.
 .It Fl k
-Display the header lines for any man pages matching
+Search man pages for
 .Ar keyword Ns Pq s ,
 in the same manner as
 .Xr apropos 1 .
diff -r 8e95d129d23a -r d99ba37d4778 usr.bin/man/man.c
--- a/usr.bin/man/man.c Thu Jun 16 14:51:56 2016 +0000
+++ b/usr.bin/man/man.c Thu Jun 16 15:10:58 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: man.c,v 1.63 2016/05/21 17:21:40 abhinav Exp $ */
+/*     $NetBSD: man.c,v 1.64 2016/06/16 15:10:58 abhinav Exp $ */
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)man.c      8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.63 2016/05/21 17:21:40 abhinav Exp $");
+__RCSID("$NetBSD: man.c,v 1.64 2016/06/16 15:10:58 abhinav Exp $");
 #endif
 #endif /* not lint */
 
@@ -1031,8 +1031,9 @@
 {
        (void)fprintf(stderr, "Usage: %s [-acw|-h] [-C cfg] [-M path] "
            "[-m path] [-S srch] [[-s] sect] name ...\n", getprogname());
+       (void)fprintf(stderr, "Usage: %s [-C file] -f command ...\n", getprogname());
        (void)fprintf(stderr, 
-           "Usage: %s -k [-C cfg] [-M path] [-m path] keyword ...\n", 
+           "Usage: %s [-C file] -k keyword ...\n", 
            getprogname());
        (void)fprintf(stderr, "Usage: %s -p\n", getprogname());
        exit(EXIT_FAILURE);



Home | Main Index | Thread Index | Old Index