canonical / canonical/craft-cli

Register the `help` command

Open
#200 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
16
Forks
27
Avg merge
1d 22h
Merged PRs (30d)
10

Description

### 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]
...
For more information about a command, run 'rockcraft help '.
```

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](https://bugs.launchpad.net/snapcraft/+bug/2043012) from @brlin-tw

Contributor guide

Open the contributing guide

Research direction

Start by locating how craft-cli registers commands and how its existing help handling is connected. Compare the behavior described for `rockcraft help help` with the registered help command example in Snapcraft's snapcraft_legacy. Done means `help` is recognized as a command and `rockcraft help help` provides help for itself.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.