Skip to content

Sort tips by their likely usefulness #5875

Open
@nazar-pc

Description

Please complete the following tasks

Clap Version

4.5.18

Describe your use case

When user uses incorrect CLI options, clap tries to generate a helpful error message:

Usage: subspace-farmer cluster --nats-server <NATS_SERVERS> cache <DISK_CACHES|--tmp <TMP>|--cache-group <CACHE_GROUP>|--service-instances <SERVICE_INSTANCES>|ADDITIONAL_COMPONENTS>
  tip: to pass '--cache-groups' as a value, use '-- --cache-groups'
  tip: a similar argument exists: '--cache-group'
error: unexpected argument '--cache-groups' found

The issue here is that "tip: to pass '--abc' as a value, use '-- --abc'" is rarely a desired outcome in my experience.

What is more helpful is the next tip after that indicating a minor typo.

Describe the solution you'd like

Sort tips with those that are more likely to happen first, in above example suggest to use similarly named CLI option before value argument.

Alternatives, if applicable

No response

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Raise on the bar on expectations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions