Open kamadorueda opened 3 years ago
we can also introduce a 'help summary' displayed to the right of the command, and then it expands on full match or on-click
This sounds perfect! We should however maintain the --help
contract for direct invocation.
The relevant contract here is that help
is not null on any derivation:
Yeah, I agree everything should have help,
plus a flag for disabling adding such help to the CLI, as some apps may have their own --help already (for instance $ m f /skims --help
comes from their source code and not from Makes injected help)
plus a flag for disabling adding such help to the CLI
m . /path/to/script -- --help
This is how the esacpe hatch is currently implemented. It was the best design I could come up with.
In the context of makes
tasks, --help
might still have a different focus. For example it might be a use case specific instruction whereas -- --help
might just be the general command help.
Currently we handle help scripts like this:
You exec command --help:
then it runs and show:
Now that we have an excellent CLI, instead of having a markdown help that is invoked in the script itself, we can make it part of the CLI and render it once there is a full match for the output, in the bottom panel:
it would be faster, more dynamic, more accesible, auto-documented, and our CLI library already supports rendering markdown excellently
@blaggacao