canonical / craft-cli

https://canonical-craft-cli.readthedocs-hosted.com/en/latest/
GNU Lesser General Public License v3.0
9 stars 15 forks source link

Register the `help` command #200

Open mr-cal opened 10 months ago

mr-cal commented 10 months ago

What needs to get done

Register help as a command so it can provide help text for itself.

Why it needs to get done

Consider the following user experience.

Rockcraft suggests using the help command:

> rockcraft help
Usage:
    rockcraft [help] <command>
...
For more information about a command, run 'rockcraft help <command>'.

However, help does not have any help itself:

> rockcraft help help
Usage: rockcraft [options] command [args]...
Try 'rockcraft -h' for help.

Error: command 'help' not found to provide help for

Snapcraft is an interesting example because it has a help command registered in snapcraft_legacy.

Source: LP#2043012 from @brlin-tw