Page MenuHomeFreeBSD

man(1): Add EXAMPLES section
ClosedPublic

Authored by fernape on Dec 10 2020, 4:12 PM.

Details

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 OK
Unit
No Unit 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!