3 ms·
Some programs kinda do that, but you're hitting on an old problem that Unix/Linux has a few ways of doing similar things all of which can miss the mark. comman
by nonrandomstring 4y ago
Some programs kinda do that, but you're hitting on an old
problem that Unix/Linux has a few ways of doing similar things
all of which can miss the mark.
commands info, man and apropos are fairly close to your goal, but:
- info only covers bash/core-utils
- not everything installs something into the apropos file (and many
package managers seem awful at remembering to delete entries on
uninstall)
- man pages have many standards and good practices, but some are
still terrible or nonexistent
So a --help switch is the lowest common denominator. And has the
advantage of living in the executable as an argument parsing
outcome. But that means it suffers locale parochialism.
I think people may be afraid adding yet another switch like --explain
would only make things messier.
So far I think the best is usually the first stanza of a well written
man page.