by bottlepalm · 3y ago · 0 comments
I'd go so far as to say all command line apps should have an -explain suffix, that doesn't actually run the command it just parses it and outputs how it understands it in plain text. Combined with the above to help avoid AI mistakes.
Adding -h or --help generally does something useful
If --explain is part of the argument parser then it would be relatively easy to implement.
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.