4 ms·
The list is probably ignoring man foo apropos foo Info foo ;-) Fun aside, I think -h/--help is nowadays the most widespread and accepted version
by ktpsns 5y ago
The list is probably ignoring
man foo
apropos foo
Info foo
;-)
Fun aside, I think -h/--help is nowadays the most widespread and accepted version in Linux/Unix-Land. A good CLI argument parser accepts both variants.
- anjbe 5y agoI always default to “man foo”, because of the occasional tool that when presented with -h or --help creates a file with that name; even if there’s no manpage, “man foo” will never have any undesired side effects. Nearly every tool does have a manpage (even a basic one) thanks to Debian’s manpage policy: “Each program, utility, and function should have an associated manual page included in the same package or a dependency.… If no manual page is available, this is considered as a bug and should be reported to the Debian Bug Tracking System.” The rare times I encounter a command‐line tool that has no manpage, I’ll sometimes write one and contribute it upstream. Of course some programs have a useless manpage that points to info. Thankfully that is pretty much limited to GNU tools which I’m lucky enough to not have to use very often.
- gifnamething 5y agoThere is the occasion where the manpage is useless compared to the help or the website docs. For example, the ironic 'man doxygen'.
- SAI_Peregrinus 5y agoOr the man page for OpenSSL's config, which actually has many of the options in the man pages for `req`, `x509`, and `ca`.
- twic 5y agoHey, at least this doesn't create a file: shutdown -h
- pcthrowaway 5y ago> Fun aside, I think -h/--help is nowadays the most widespread and accepted version in Linux/Unix-Land The most notable exception (to me) among modern tooling is the `aws` cli, which parses help as a subcommand. And if you try `--help` it just gives you an `Unkown option` response. I'm mildly amused by the need to reserve a little bit of brain-space for the ways to ask cli tooling for help
- ktpsns 5y agoIt would be easy for the authors of this tool to fix this behaviour. Checkout `git --help` vs `git help`, both versions work. That's just being nice to the user.