Skip to content

Unknown-command suggestions are empty or misleading #16

@anmarhindi

Description

@anmarhindi

Description

When openai is invoked with an unknown subcommand, the "Did you mean ..." hint that follows No help topic for 'X'. is either empty or points at a command that has nothing to do with the user's input. suggestCommand in pkg/cmd/suggest.go picks the highest jaro-winkler score with no minimum threshold, so any unknown string gets a suggestion even when nothing is close.

Repro

$ openai responses zzzzz
No help topic for 'zzzzz'. Did you mean ''?

$ openai totallybogus
No help topic for 'totallybogus'. Did you mean 'openai completions'?

Expected

For input that isn't close to any real command, the CLI should just print No help topic for 'X'. with no suggestion clause. Genuine typos like creat -> create should still be suggested.

Environment

  • openai CLI v1.1.2
  • macOS / darwin-arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions