Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need remind error when pass illegal completion subcommand #612

Open
chunfuwen opened this issue Aug 20, 2024 · 1 comment
Open

Need remind error when pass illegal completion subcommand #612

chunfuwen opened this issue Aug 20, 2024 · 1 comment

Comments

@chunfuwen
Copy link

  1. execute command: sudo podman run --rm -it --privileged --entrypoint=/usr/bin/bootc-image-builder quay.io/centos-bootc/bootc-image-builder:latest completion test
  2. it need throw error since bib doesn't support completion test subcommand
  3. But actually it normally output as below
root@xx bootc-image-builder]# sudo podman run --rm -it --privileged --entrypoint=/usr/bin/bootc-image-builder quay.io/centos-bootc/bootc-image-builder:latest completion test
Generate the autocompletion script for bootc-image-builder for the specified shell.
See each sub-command's help for details on how to use the generated script.

Usage:
  bootc-image-builder completion [command]

Available Commands:
  bash        Generate the autocompletion script for bash
  fish        Generate the autocompletion script for fish
  powershell  Generate the autocompletion script for powershell
  zsh         Generate the autocompletion script for zsh

Flags:
  -h, --help   help for completion

Global Flags:
      --log-level string   logging level (debug, info, error); default error

Use "bootc-image-builder completion [command] --help" for more information about a command.

@mvo5
Copy link
Collaborator

mvo5 commented Aug 20, 2024

It seems this is a bit of a missing feature in cobra, see spf13/cobra#1156 - the good news is that there is an open PR in spf13/cobra#2167 that hopefully fixes this. I am looking to see if there is a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants