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)
Tue, Apr 16, 5:31 PM
Unknown Object (File)
Dec 20 2023, 5:10 AM
Unknown Object (File)
Dec 14 2023, 10:04 PM
Unknown Object (File)
Nov 22 2023, 3:23 PM
Unknown Object (File)
Nov 14 2023, 3:57 PM
Unknown Object (File)
Nov 13 2023, 12:08 PM
Unknown Object (File)
Nov 12 2023, 9:27 PM
Unknown Object (File)
Nov 12 2023, 3:09 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
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!