Page MenuHomeFreeBSD

id: Add -d and -s options
ClosedPublic

Authored by des on Oct 23 2025, 5:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 10, 2:22 PM
Unknown Object (File)
Sat, Jan 10, 2:40 AM
Unknown Object (File)
Tue, Dec 23, 11:40 PM
Unknown Object (File)
Nov 8 2025, 11:55 PM
Unknown Object (File)
Nov 4 2025, 6:22 PM
Unknown Object (File)
Nov 3 2025, 5:10 PM
Unknown Object (File)
Nov 2 2025, 8:23 AM
Unknown Object (File)
Oct 28 2025, 5:23 PM

Details

Summary

These options may not be combined with any other options and print the
current or specified user's home directory and shell respectively.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Oct 23 2025, 5:23 PM
des added a parent revision: D53300: id: Clean up.
obrien added inline comments.
usr.bin/id/id.1
53–55

If -d and -s aren't in POSIX p1003.2, please document they are non-standard.

usr.bin/id/id.c
58–59

I'm having trouble finding these function defintions. Are they missing from this diff, or depend on another active review?

bcr added a subscriber: bcr.

OK for the manpage part of the review.

This revision is now accepted and ready to land.Oct 23 2025, 6:38 PM
This revision now requires review to proceed.Oct 23 2025, 6:52 PM
des marked an inline comment as done.Oct 23 2025, 6:53 PM
des marked an inline comment as done.Oct 23 2025, 7:03 PM

Other than needlessly libxo-izing this (-P serves 99% of the need there), I think you've done almost all you can to modernize it. Though the (void) casts to fprintf and the like do look a bit archaic. :)

This revision is now accepted and ready to land.Oct 28 2025, 4:08 PM

The motivation here was seeing ports use eval echo ~$user to figure out a user's home directory... “surely there's got to be a better way”

This revision was automatically updated to reflect the committed changes.