Which is the best command line option to get a help menu?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Which is the most Slackware-like option?
The -h option (the program should recommend -h when started without any option specified).
1
100.00%
The --help option (the program should recommend --help when started with -h or without any option).
0
0%
The "no" option (the program should display list of options only when started without any option).
0
0%
The "rtfm" option (the program should point to manual or info, without options or examples).
Which is the best command line option to get a help menu?
In Slackware, there's many programs with their helpful lists of command line options.
For the most part, they don't have a standard way to display the help menu.
So what I want to ask, why can't they all agree that -h is faster and easier to type?
Having a -h that just recommends typing --help, or info $program, well that isn't very helpful.
What do you think, which of those should be considered a Slackware standard?
In Slackware, there's many programs with their helpful lists of command line options.
For the most part, they don't have a standard way to display the help menu.
So what I want to ask, why can't they all agree that -h is faster and easier to type?
Having a -h that just recommends typing --help, or info $program, well that isn't very helpful.
What do you think, which of those should be considered a Slackware standard?
I generally refer to the man pages for help info. Although -h and --help are available as options in a lot of software it's not always the case and Slackware includes work from a great many different people and sources. So, I wouldn't say there was a Slackware "help menu standard" because not all software developers create their software with Slackware standards in mind. Some software I use with Slackware doesn't include a man page. For me it's more a case of finding out and learning what's required with any software and remembering it for the next time I use it.
For me it's more a case of finding out and learning what's required with any software and remembering it for the next time I use it.
But you do agree that remembering to consult the manual is easier than remembering exactly which one requires -h and which one requires something else?
I'm serious about this: it's not the lack of standard that bothers me, just the recent push for standard where traditionally there weren't any standard to begin with.
There are many standards i.e POSIX, ANSI C, LSB and GNU are a few. Many linux programs were based on BSB which is POSIX but have GNU extensions.
One would hope a developer will follow a standard but since there are thousands of programs out there some dating back to the beginning it isn't practical IMHO to have a slackware standard.
But you do agree that remembering to consult the manual is easier than remembering exactly which one requires -h and which one requires something else?
I'm serious about this: it's not the lack of standard that bothers me, just the recent push for standard where traditionally there weren't any standard to begin with.
The only thing I'd agree with is that it's not within my remit, or jurisdiction, as an end-user to influence how Slackware developers should build/create/manage their software. Sure, I have a lot of ideas and pipe-dreams about what could or should be, but that's usually a casual desire to change something to make it easier for myself. IMO there's nothing wrong with the way Slackware currently implements any help menus and info. So, 'if it's not broked don't fix it' is the mainstay of my mentality. On a completely subjective facetious level I could suggest that, "Today, Slackware is the most UNIX-like distribution of them all. Tomorrow, Slackware could be the most Ubuntu-like distribution of them all!"
As you've mentioned, there are standards and traditions, which Slackware has always supported and maintained. Any push for change needs to be implemented due to essential conditions or necessity, and that's down to the Slackware developers to consider.
casual desire to change something to make it easier for myself
That's how all great software was started.
Quote:
Originally Posted by Exaga
IMO there's nothing wrong with the way Slackware currently implements any help menus and info.
Agreed, it's been the same for as long as I remember, some programs do one thing and some programs do the other thing.
Likewise, I think some distributions do one thing and some distributions do the other thing, so they should continue to do so independently of one another.
And not be forced to do that one thing just because all the big distributions have already done it, you know?
Quote:
Originally Posted by Exaga
Tomorrow, Slackware could be the most Ubuntu-like distribution of them all!
I'm staying optimist about it, not going to live long enough for this to happen but I guess some will welcome the change with open arms.
Only Patrick is entitled to publish a Slackware specification , which of course only the utilities written specifically for Slackware would have to comply to, so I won't vote.
I have written a few utilities for Slint, most usable on Slackware, and usually display a help file if user types just the name of the utility without arguments but it needs at least one, or if user types a non-supported option or argument.
I have looked into the Utility Conventions of the POSIX specification and didn't find anything about a help text.
Anyway a semi-skilled user should be able to find the help information typing just the command or with -h or --help, or in the man page, or in the info page, or in the documentation for this utility so personally I don't bother.
Last edited by Didier Spaier; 05-30-2021 at 05:00 AM.
I have written a few utilities for Slint, most usable on Slackware, and usually display a help file if user types just the name of the utility without arguments but it needs at least one, or if user types a non-supported option or argument.
Thank you for not making -h a requirement when --help is specified, or the other way around.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.