Skip to content

Cobra's auto-generated completion subcommand is undocumented and shadows the URL argument #36

Description

@korya

Problem

Cobra registers a completion subcommand by default. It is never mentioned in the README, and it takes precedence over the positional URL argument.

Reproduction

$ http-assert completion
Generate the autocompletion script for http-assert for the specified shell.

[exit=0]

Why it matters

The shadowing is a cosmetic edge case (a URL literally named completion is not a real scenario). The genuine gap is that shell completion exists and works but nobody knows about it.

Suggested fix

Document http-assert completion <shell> in the README installation section, or disable the subcommand via CompletionOptions.DisableDefaultCmd if it is not intended to be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions