bash completions for kubectl

Support pre command flags:
--api-version=
-a, --auth-path=
--certificate-authority=
--client-certificate=
--client-key=
--insecure-skip-tls-verify=
--match-server-version=
-s, --server=

And commands:
get
describe
create
update
delete

Tries to be smart about things like

kubectl get -o template  requires a template file

It also tries to accept both sigular and plural versions of all
resources.  Even though it will only complete to the plural version.
On Sat, 2014-10-18 at 14:51 -0700, Sam Ghods wrote:
> In contrib/completions/bash/kubectl:
> 
> > +        local word=${words[i]}
> > +        if __contains_word "${word}" "${all_resources[@]}"; then
> > +            return 0
> > +        fi
> > +    done
> > +    return 1
> > +}
> > +
> > +# call kubectl list $1,
> > +# exclude blank lines
> > +# skip the header stuff kubectl prints on the first 2 lines
> > +# append $1/ to the first column and use that in compgen
> > +__kubectl_parse_list()
> > +{
> > +    local kubectl_output out
> > +    if kubectl_output=$(kubectl get --no-headers "$1" 2>/dev/null); then
> 
> Ahh now I understand, you're using the results for your completion.
> Cool. Then the only remaining nit is that you could change the kubectl
> list reference to kubectl get. :)

Good call, fixed.