From 94b4659b7b245b15faf6276e9c1f1de07ff6d6a4 Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Mon, 31 Aug 2015 16:37:44 -0700 Subject: [PATCH] Enable kubectl rolling-update rc name bash completion --- contrib/completions/bash/kubectl | 9 +++++++++ pkg/kubectl/cmd/cmd.go | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl index 08f18d5eb03..5325d14e8fc 100644 --- a/contrib/completions/bash/kubectl +++ b/contrib/completions/bash/kubectl @@ -186,6 +186,11 @@ __kubectl_get_resource_pod() __kubectl_parse_get "pod" } +__kubectl_get_resource_rc() +{ + __kubectl_parse_get "rc" +} + # $1 is the name of the pod we want to get the list of containers inside __kubectl_get_containers() { @@ -229,6 +234,10 @@ __custom_func() { __kubectl_get_resource_pod return ;; + kubectl_rolling-update) + __kubectl_get_resource_rc + return + ;; *) ;; esac diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 53c191b5a9a..3865de98271 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -52,6 +52,11 @@ __kubectl_get_resource_pod() __kubectl_parse_get "pod" } +__kubectl_get_resource_rc() +{ + __kubectl_parse_get "rc" +} + # $1 is the name of the pod we want to get the list of containers inside __kubectl_get_containers() { @@ -95,6 +100,10 @@ __custom_func() { __kubectl_get_resource_pod return ;; + kubectl_rolling-update) + __kubectl_get_resource_rc + return + ;; *) ;; esac