Skip to content

feat: suggest closest command on unknown subcommand #629

Description

@margaretjgu

Unknown subcommands print unknown command: foo and stop (src/factory-core.ts defineGroup). On a generated tree (100+ KB namespaces, long ES names) that is the usual human and agent miss.

On unknown command, suggest the closest registered sibling (Levenshtein or commander's built-in). Cap at 3 suggestions. Same for unknown flags if cheap.

Acceptance: elastic stack es indice (missing s) suggests indices. Test the misspelling. No suggestion when distance is large.

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

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions