Skip to content

Commit

Permalink
cmd: remove custom completion subcommand
Browse files Browse the repository at this point in the history
Since the release of cobra v1.2.0, a completion command is automatically
created if none is provided. We therefore do not need to ship our own
anymore.

Note that this means two breaking changes:

- Calling `cilium completion` without specifying a shell name no leads
  to printing out the help message for the command. Our implementation
  used to generate completion for bash. I think that, although breaking,
  this change is for the better.
- We used to support `ps1` as an alias for `powershell` and the builtin
  subcommand does not.

What we get is more uniformity for our users. Most CLI tools using cobra
are likely to use the built-in command to generate shell completion
rather than rolling their own.

Signed-off-by: Robin Hahling <[email protected]>
  • Loading branch information
rolinh authored and tklauser committed Jul 5, 2021
1 parent 0c1001a commit 931fb09
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 94 deletions.
1 change: 0 additions & 1 deletion internal/cli/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ cilium connectivity test`,
cmd.AddCommand(
newCmdClusterMesh(),
newCmdConfig(),
newCmdCompletion(),
newCmdConnectivity(),
newCmdContext(),
newCmdHubble(),
Expand Down
93 changes: 0 additions & 93 deletions internal/cli/cmd/completion.go

This file was deleted.

0 comments on commit 931fb09

Please sign in to comment.