Page MenuHomeFreeBSD

man(1): Add EXAMPLES section
ClosedPublic

Authored by fernape on Dec 10 2020, 4:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 5, 2:49 PM
Unknown Object (File)
Sat, Sep 5, 11:57 AM
Unknown Object (File)
Sat, Sep 5, 5:52 AM
Unknown Object (File)
Sat, Sep 5, 4:36 AM
Unknown Object (File)
Fri, Sep 4, 7:58 AM
Unknown Object (File)
Thu, Sep 3, 1:09 PM
Unknown Object (File)
Wed, Sep 2, 9:36 AM
Unknown Object (File)
Wed, Sep 2, 6:36 AM

Details

Reviewers
gbe
Group Reviewers
manpages
Commits
rGdf965a6829f0: man(1): Add EXAMPLES section
Summary

Add some examples showing the use of the flags: a, k, P, w

Test Plan
  • mandoc -Tlint clean
  • igor clean
  • aspell happy
  • man ./man.1 renders the page properly

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35307
Build 32239: arc lint + arc unit

Event Timeline

gbe added inline comments.
usr.bin/man/man.1
376

This example leads to 'apropos: nothing appropriate'.

yuripv added inline comments.
usr.bin/man/man.1
376

seems to work for me:

$ man -k '\<copy\>.*archive'
cpio, bsdcpio(1) - copy files to and from archives
usr.bin/man/man.1
376

Thats a little strange, on -CURRENT I get

$ man -k '\<copy\>.*archive'
cpio, bsdcpio(1) - copy files to and from archives

and on -STABLE I get
$ man -k '\<copy\>.*archive'
bsdcpio, cpio(1) - copy files to and from archives
cpio, bsdcpio(1) - copy files to and from archives

usr.bin/man/man.1
376

In current:

[fernape@vm-current ~]$ man -k '\<copy\>.*archive'
cpio, bsdcpio(1) - copy files to and from archives

But in 12.1-RELEASE

$ man -k '\<copy\>.*archive'
bsdcpio, cpio(1) - copy files to and from archives
cpio, bsdcpio(1) - copy files to and from archives

It seems in 12.1 and 12-STABLE the whatis(1) database has duplicates. One for bsdcpio first and one with cpio first.
There are two man pages in both -CURRENT and 12.1 but they are actually the same:

$ man -w cpio bsdcpio
/usr/share/man/man1/cpio.1.gz
/usr/share/man/man1/bsdcpio.1.gz

$ cmp /usr/share/man/man1/cpio.1.gz /usr/share/man/man1/bsdcpio.1.gz
$

It looks to me like it was fixed somewhere in -CURRENT.

This revision is now accepted and ready to land.Jan 9 2021, 1:45 PM
This revision was automatically updated to reflect the committed changes.
In D27545#626954, @gbe wrote:

LGTM

Committed, thanks for the review!