Skip to content

Commit

Permalink
chore(completion): suggest languages
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli authored and nicolaferraro committed Sep 24, 2018
1 parent 39a7dd2 commit 994735e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/client/cmd/completion_bash.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 994735e

Please sign in to comment.