On Sun, Oct 26, 2025 at 09:40:04AM +0100, tito wrote:
> On Sun, 26 Oct 2025 08:18:26 +0200
> Nir Lichtman <[email protected]> wrote:
> 
> > Problem: Currently the usage of `id` shows two unsupported options.
> > 
> > Solution: Remove unsupported options from usage.
> > 
[..]
> >  
> >  //usage:#define id_trivial_usage
> > -//usage:       "[-ugGnr"IF_SELINUX("Z")"] [USER]"
> > +//usage:       "[-ugG"IF_SELINUX("Z")"] [USER]"
> Hi,
> the -n option works:
> 
> ./busybox id -un tito
> tito
>  ./busybox id -u tito
> 1000
> 
> For checking the -r option you can use the examples in
> the test script in busybox/coreutils/  named id_test.sh:
> 

Hi Tito,

Makes sense, thanks for the explanations.
IMO the current usage is pretty confusing since
it doesn't emphasize that -n and -r must be used
in conjunction with -u or -g.

Would a patch fixing the usage to emphasize this be
fitting for BusyBox or is it on purpose as such?

As an example for inspiration, the OpenBSD man page and usage
emphasizes this: https://man.openbsd.org/id

Thanks,
Nir
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to