This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 994735ed21484ec363a2740eb625f81523612b92
Author: lburgazzoli <[email protected]>
AuthorDate: Mon Sep 24 22:15:36 2018 +0200

    chore(completion): suggest languages
---
 pkg/client/cmd/completion_bash.go | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/pkg/client/cmd/completion_bash.go 
b/pkg/client/cmd/completion_bash.go
index a109e36..c689f8e 100644
--- a/pkg/client/cmd/completion_bash.go
+++ b/pkg/client/cmd/completion_bash.go
@@ -66,6 +66,11 @@ __kamel_dependency_type() {
     esac
 }
 
+__kamel_languages() {
+    local type_list="js groovy java xml"
+    COMPREPLY=( $( compgen -W "${type_list}" -- "$cur") )
+}
+
 __kamel_kubectl_get_configmap() {
     local template
     local kubectl_out
@@ -183,6 +188,13 @@ func configureKnownBashCompletions(command *cobra.Command) 
{
                        cobra.BashCompCustom: 
{"__kamel_kubectl_get_user_integrationcontexts"},
                },
        )
+       configureBashAnnotationForFlag(
+               command,
+               "language",
+               map[string][]string{
+                       cobra.BashCompCustom: {"__kamel_languages"},
+               },
+       )
 }
 
 func configureBashAnnotationForFlag(command *cobra.Command, flagName string, 
annotations map[string][]string) {

Reply via email to