Page MenuHomeFreeBSD

which(1): Add EXAMPLES section to manpage
ClosedPublic

Authored by fernape on Aug 25 2020, 4:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 10, 7:34 PM
Unknown Object (File)
Dec 6 2024, 2:00 AM
Unknown Object (File)
Nov 29 2024, 11:35 PM
Unknown Object (File)
Oct 11 2024, 4:53 AM
Unknown Object (File)
Sep 27 2024, 1:19 PM
Unknown Object (File)
Sep 27 2024, 12:57 PM
Unknown Object (File)
Sep 26 2024, 9:07 PM
Unknown Object (File)
Sep 25 2024, 9:34 PM

Details

Summary

Add EXAMPLES section showing the use of -a and -s flags and how which(1)
treates duplicates.

Test Plan
  • mandoc -Tlint clean
  • igor clean (a spurious warning for the first line)
  • aspell happy
  • man ./which.1 renders the page properly

Diff Detail

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

Event Timeline

gbe added inline comments.
usr.bin/which/which.1
72

Is there a reason, why you use the full path of the executable?

usr.bin/which/which.1
72

Is there a reason, why you use the full path of the executable?

First of all, thanks for reviewing and sorry for my late response. I was AFK for some days :-)

I did it for consistency. The examples that play with $PATH need the full path, or the which command will not be found.

I see a couple of options:

  • We can leave this as it is (first and last examples would not need the full path though, and that might be confusing)
  • I can use full path only where it is needed (examples 2 and 3) and add a note to indicate why we are using it that way.

Thanks!

gbe added inline comments.
usr.bin/which/which.1
72

Oh, I wasn't aware that the full path is needed if a specific PATH variable is set. Then I would leave it as is.

This revision is now accepted and ready to land.Sep 23 2020, 6:56 PM
This revision was automatically updated to reflect the committed changes.