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)
Mar 17 2024, 6:24 AM
Unknown Object (File)
Feb 8 2024, 8:02 PM
Unknown Object (File)
Nov 12 2023, 1:39 PM
Unknown Object (File)
Aug 16 2023, 9:34 AM
Unknown Object (File)
Aug 6 2023, 8:59 AM
Unknown Object (File)
Jul 10 2023, 11:00 PM
Unknown Object (File)
Apr 1 2023, 10:39 AM
Unknown Object (File)
Jan 17 2023, 9:33 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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

gbe added inline comments.
usr.bin/which/which.1
72 ↗(On Diff #76206)

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

usr.bin/which/which.1
72 ↗(On Diff #76206)

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 ↗(On Diff #76206)

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.