Page MenuHomeFreeBSD

man(1): Add EXAMPLES section
ClosedPublic

Authored by fernape on Dec 10 2020, 4:12 PM.
Tags
None
Referenced Files
F132327409: D27545.diff
Wed, Oct 15, 10:41 PM
Unknown Object (File)
Mon, Oct 13, 12:06 PM
Unknown Object (File)
Mon, Oct 13, 12:06 PM
Unknown Object (File)
Mon, Oct 13, 12:06 PM
Unknown Object (File)
Sun, Oct 12, 11:26 PM
Unknown Object (File)
Mon, Oct 6, 3:33 AM
Unknown Object (File)
Wed, Oct 1, 5:00 PM
Unknown Object (File)
Wed, Sep 24, 10:38 PM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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!