On Tue, Jul 01, 2025 at 03:39:57PM +0200, Benno Schulenberg wrote: > > Op 01-07-2025 om 07:16 schreef Madadi Vineeth Reddy: > > Nit: I think we could still have "Try 'chrt --help' for more information." > > along with your "too few arguments" so that user knows exactly how > > many arguments are needed. > > The reason I don't want to see "Try 'chrt --help' for more information." > when I make a mistake is that it means that I have to read two lines: We should be consistent. The `errtryhelp()` function is usually used as the default error for an unknown option or when the user is "lost" on the command line, for example, if not all required arguments are used. warnx(_("too few arguments")); errtryhelp(EXIT_FAILURE); (or "bad usage") is consistent with the rest of util-linux. I can imagine a new function `errclimess(EXIT_FAILURE)` (or a better name ;-) for exactly this case to avoid creativity in code. We can use it everywhere and keep the error message on one line "unexpected number of arguments, try chrt --help" or so. Would this be a good compromise? > the error message plus the "Try...". It takes me more time, _and_ the > second line doesn't add any information -- it just states the obvious. It does not have to be obvious to all users, -? -h, -H, --help, sometimes nothing, etc. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com