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, Jan 25, 7:52 PM
Unknown Object (File)
Fri, Jan 10, 12:51 PM
Unknown Object (File)
Sat, Jan 4, 7:30 AM
Unknown Object (File)
Dec 12 2024, 11:42 PM
Unknown Object (File)
Nov 14 2024, 4:05 AM
Unknown Object (File)
Oct 9 2024, 7:56 AM
Unknown Object (File)
Oct 7 2024, 9:58 AM
Unknown Object (File)
Sep 30 2024, 9:36 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!