This is an automated email from the ASF dual-hosted git repository.
tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 6fbba6ba7 chore(cli): Remove dead code on completion for context flag
no longer existing
6fbba6ba7 is described below
commit 6fbba6ba7f107c9993fe3bf278a84281e0b0aedf
Author: Gaelle Fournier <[email protected]>
AuthorDate: Tue Dec 13 14:14:33 2022 +0100
chore(cli): Remove dead code on completion for context flag no longer
existing
* `--context` flag was replaced by `--kit` flag (#726) then `kit` flag was
removed from `kamel install` command (#1609)
---
pkg/cmd/completion_bash.go | 8 --------
pkg/cmd/install.go | 9 ---------
2 files changed, 17 deletions(-)
diff --git a/pkg/cmd/completion_bash.go b/pkg/cmd/completion_bash.go
index 2d6f9b888..ca8720d67 100644
--- a/pkg/cmd/completion_bash.go
+++ b/pkg/cmd/completion_bash.go
@@ -25,7 +25,6 @@ import (
"github.com/spf13/cobra"
v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
- "github.com/apache/camel-k/pkg/platform"
"github.com/apache/camel-k/pkg/trait"
"github.com/apache/camel-k/pkg/util/camel"
)
@@ -247,13 +246,6 @@ __kamel_kubectl_get_non_platform_integrationkits() {
fi
}
-__kamel_kubectl_get_known_integrationkits() {
- local type_list="` + strings.Join(platform.GetKitsNames(), " ") + `"
- COMPREPLY=( $( compgen -W "${type_list}" -- "$cur") )
- compopt -o nospace
-}
-
-
__kamel_kubectl_get_kamelets() {
local template
local kubectl_out
diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index 002e53d45..13ec31924 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -153,15 +153,6 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions)
(*cobra.Command, *installCmdO
// save
cmd.Flags().Bool("save", false, "Save the install parameters into the
default kamel configuration file (kamel-config.yaml)")
- // completion support
- configureBashAnnotationForFlag(
- &cmd,
- "context",
- map[string][]string{
- cobra.BashCompCustom:
{"__kamel_kubectl_get_known_integrationcontexts"},
- },
- )
-
return &cmd, &options
}