Commit 20b90ee2 authored by Quinton Hoole's avatar Quinton Hoole

Merge pull request #13570 from eparis/completions-on-mac

Make bash completions work on a Mac
parents 19017c76 bf7646bd
...@@ -512,7 +512,7 @@ ...@@ -512,7 +512,7 @@
}, },
{ {
"ImportPath": "github.com/spf13/cobra", "ImportPath": "github.com/spf13/cobra",
"Rev": "db0518444643a7b170abb78164bbeaf5a2bb816f" "Rev": "68f5a81a722d56241bd70faf6860ceb05eb27d64"
}, },
{ {
"ImportPath": "github.com/spf13/pflag", "ImportPath": "github.com/spf13/pflag",
......
...@@ -422,6 +422,10 @@ func main() { ...@@ -422,6 +422,10 @@ func main() {
Cobra can generate a markdown formatted document based on the subcommands, flags, etc. A simple example of how to do this for your command can be found in [Markdown Docs](md_docs.md) Cobra can generate a markdown formatted document based on the subcommands, flags, etc. A simple example of how to do this for your command can be found in [Markdown Docs](md_docs.md)
## Generating man pages for your command
Cobra can generate a man page based on the subcommands, flags, etc. A simple example of how to do this for your command can be found in [Man Docs](man_docs.md)
## Generating bash completions for your command ## Generating bash completions for your command
Cobra can generate a bash completions file. If you add more information to your command these completions can be amazingly powerful and flexible. Read more about [Bash Completions](bash_completions.md) Cobra can generate a bash completions file. If you add more information to your command these completions can be amazingly powerful and flexible. Read more about [Bash Completions](bash_completions.md)
......
...@@ -19,7 +19,6 @@ const ( ...@@ -19,7 +19,6 @@ const (
func preamble(out *bytes.Buffer) { func preamble(out *bytes.Buffer) {
fmt.Fprintf(out, `#!/bin/bash fmt.Fprintf(out, `#!/bin/bash
__debug() __debug()
{ {
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
...@@ -27,6 +26,14 @@ __debug() ...@@ -27,6 +26,14 @@ __debug()
fi fi
} }
# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
# _init_completion. This is a very minimal version of that function.
__my_init_completion()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev words cword
}
__index_of_word() __index_of_word()
{ {
local w word=$1 local w word=$1
...@@ -188,7 +195,11 @@ func postscript(out *bytes.Buffer, name string) { ...@@ -188,7 +195,11 @@ func postscript(out *bytes.Buffer, name string) {
fmt.Fprintf(out, "__start_%s()\n", name) fmt.Fprintf(out, "__start_%s()\n", name)
fmt.Fprintf(out, `{ fmt.Fprintf(out, `{
local cur prev words cword local cur prev words cword
_init_completion -s || return if declare -F _init_completions >/dev/null 2>&1; then
_init_completion -s || return
else
__my_init_completion || return
fi
local c=0 local c=0
local flags=() local flags=()
...@@ -212,7 +223,7 @@ func postscript(out *bytes.Buffer, name string) { ...@@ -212,7 +223,7 @@ func postscript(out *bytes.Buffer, name string) {
func writeCommands(cmd *Command, out *bytes.Buffer) { func writeCommands(cmd *Command, out *bytes.Buffer) {
fmt.Fprintf(out, " commands=()\n") fmt.Fprintf(out, " commands=()\n")
for _, c := range cmd.Commands() { for _, c := range cmd.Commands() {
if len(c.Deprecated) > 0 { if len(c.Deprecated) > 0 || c == cmd.helpCommand {
continue continue
} }
fmt.Fprintf(out, " commands+=(%q)\n", c.Name()) fmt.Fprintf(out, " commands+=(%q)\n", c.Name())
...@@ -292,7 +303,7 @@ func writeRequiredFlag(cmd *Command, out *bytes.Buffer) { ...@@ -292,7 +303,7 @@ func writeRequiredFlag(cmd *Command, out *bytes.Buffer) {
fmt.Fprintf(out, " must_have_one_flag=()\n") fmt.Fprintf(out, " must_have_one_flag=()\n")
flags := cmd.NonInheritedFlags() flags := cmd.NonInheritedFlags()
flags.VisitAll(func(flag *pflag.Flag) { flags.VisitAll(func(flag *pflag.Flag) {
for key, _ := range flag.Annotations { for key := range flag.Annotations {
switch key { switch key {
case BashCompOneRequiredFlag: case BashCompOneRequiredFlag:
format := " must_have_one_flag+=(\"--%s" format := " must_have_one_flag+=(\"--%s"
...@@ -321,7 +332,7 @@ func writeRequiredNoun(cmd *Command, out *bytes.Buffer) { ...@@ -321,7 +332,7 @@ func writeRequiredNoun(cmd *Command, out *bytes.Buffer) {
func gen(cmd *Command, out *bytes.Buffer) { func gen(cmd *Command, out *bytes.Buffer) {
for _, c := range cmd.Commands() { for _, c := range cmd.Commands() {
if len(c.Deprecated) > 0 { if len(c.Deprecated) > 0 || c == cmd.helpCommand {
continue continue
} }
gen(c, out) gen(c, out)
......
...@@ -25,6 +25,13 @@ import ( ...@@ -25,6 +25,13 @@ import (
"text/template" "text/template"
) )
var templateFuncs template.FuncMap = template.FuncMap{
"trim": strings.TrimSpace,
"rpad": rpad,
"gt": Gt,
"eq": Eq,
}
var initializers []func() var initializers []func()
// automatic prefix matching can be a dangerous thing to automatically enable in CLI tools. // automatic prefix matching can be a dangerous thing to automatically enable in CLI tools.
...@@ -39,6 +46,20 @@ var MousetrapHelpText string = `This is a command line tool ...@@ -39,6 +46,20 @@ var MousetrapHelpText string = `This is a command line tool
You need to open cmd.exe and run it from there. You need to open cmd.exe and run it from there.
` `
//AddTemplateFunc adds a template function that's available to Usage and Help
//template generation.
func AddTemplateFunc(name string, tmplFunc interface{}) {
templateFuncs[name] = tmplFunc
}
//AddTemplateFuncs adds multiple template functions availalble to Usage and
//Help template generation.
func AddTemplateFuncs(tmplFuncs template.FuncMap) {
for k, v := range tmplFuncs {
templateFuncs[k] = v
}
}
//OnInitialize takes a series of func() arguments and appends them to a slice of func(). //OnInitialize takes a series of func() arguments and appends them to a slice of func().
func OnInitialize(y ...func()) { func OnInitialize(y ...func()) {
for _, x := range y { for _, x := range y {
...@@ -101,12 +122,7 @@ func rpad(s string, padding int) string { ...@@ -101,12 +122,7 @@ func rpad(s string, padding int) string {
// tmpl executes the given template text on data, writing the result to w. // tmpl executes the given template text on data, writing the result to w.
func tmpl(w io.Writer, text string, data interface{}) error { func tmpl(w io.Writer, text string, data interface{}) error {
t := template.New("top") t := template.New("top")
t.Funcs(template.FuncMap{ t.Funcs(templateFuncs)
"trim": strings.TrimSpace,
"rpad": rpad,
"gt": Gt,
"eq": Eq,
})
template.Must(t.Parse(text)) template.Must(t.Parse(text))
return t.Execute(w, data) return t.Execute(w, data)
} }
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"runtime" "runtime"
"strings" "strings"
"testing" "testing"
"text/template"
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )
...@@ -971,3 +972,20 @@ func TestFlagOnPflagCommandLine(t *testing.T) { ...@@ -971,3 +972,20 @@ func TestFlagOnPflagCommandLine(t *testing.T) {
checkResultContains(t, r, flagName) checkResultContains(t, r, flagName)
} }
func TestAddTemplateFunctions(t *testing.T) {
AddTemplateFunc("t", func() bool { return true })
AddTemplateFuncs(template.FuncMap{
"f": func() bool { return false },
"h": func() string { return "Hello," },
"w": func() string { return "world." }})
const usage = "Hello, world."
c := &Command{}
c.SetUsageTemplate(`{{if t}}{{h}}{{end}}{{if f}}{{h}}{{end}} {{w}}`)
if us := c.UsageString(); us != usage {
t.Errorf("c.UsageString() != \"%s\", is \"%s\"", usage, us)
}
}
...@@ -66,14 +66,24 @@ type Command struct { ...@@ -66,14 +66,24 @@ type Command struct {
// All functions get the same args, the arguments after the command name // All functions get the same args, the arguments after the command name
// PersistentPreRun: children of this command will inherit and execute // PersistentPreRun: children of this command will inherit and execute
PersistentPreRun func(cmd *Command, args []string) PersistentPreRun func(cmd *Command, args []string)
// PersistentPreRunE: PersistentPreRun but returns an error
PersistentPreRunE func(cmd *Command, args []string) error
// PreRun: children of this command will not inherit. // PreRun: children of this command will not inherit.
PreRun func(cmd *Command, args []string) PreRun func(cmd *Command, args []string)
// PreRunE: PreRun but returns an error
PreRunE func(cmd *Command, args []string) error
// Run: Typically the actual work function. Most commands will only implement this // Run: Typically the actual work function. Most commands will only implement this
Run func(cmd *Command, args []string) Run func(cmd *Command, args []string)
// RunE: Run but returns an error
RunE func(cmd *Command, args []string) error
// PostRun: run after the Run command. // PostRun: run after the Run command.
PostRun func(cmd *Command, args []string) PostRun func(cmd *Command, args []string)
// PostRunE: PostRun but returns an error
PostRunE func(cmd *Command, args []string) error
// PersistentPostRun: children of this command will inherit and execute after PostRun // PersistentPostRun: children of this command will inherit and execute after PostRun
PersistentPostRun func(cmd *Command, args []string) PersistentPostRun func(cmd *Command, args []string)
// PersistentPostRunE: PersistentPostRun but returns an error
PersistentPostRunE func(cmd *Command, args []string) error
// Commands is the list of commands supported by this program. // Commands is the list of commands supported by this program.
commands []*Command commands []*Command
// Parent Command for this command // Parent Command for this command
...@@ -92,7 +102,6 @@ type Command struct { ...@@ -92,7 +102,6 @@ type Command struct {
helpTemplate string // Can be defined by Application helpTemplate string // Can be defined by Application
helpFunc func(*Command, []string) // Help can be defined by application helpFunc func(*Command, []string) // Help can be defined by application
helpCommand *Command // The help command helpCommand *Command // The help command
helpFlagVal bool
// The global normalization function that we can use on every pFlag set and children commands // The global normalization function that we can use on every pFlag set and children commands
globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName globNormFunc func(f *flag.FlagSet, name string) flag.NormalizedName
} }
...@@ -179,32 +188,21 @@ func (c *Command) UsageFunc() (f func(*Command) error) { ...@@ -179,32 +188,21 @@ func (c *Command) UsageFunc() (f func(*Command) error) {
} }
} }
} }
// HelpFunc returns either the function set by SetHelpFunc for this command
// or a parent, or it returns a function which calls c.Help()
func (c *Command) HelpFunc() func(*Command, []string) { func (c *Command) HelpFunc() func(*Command, []string) {
if c.helpFunc != nil { cmd := c
return c.helpFunc for cmd != nil {
if cmd.helpFunc != nil {
return cmd.helpFunc
}
cmd = cmd.parent
} }
return func(*Command, []string) {
if c.HasParent() { err := c.Help()
return c.parent.HelpFunc() if err != nil {
} else { c.Println(err)
return func(c *Command, args []string) {
if len(args) == 0 {
// Help called without any topic, calling on root
c.Root().Help()
return
}
cmd, _, e := c.Root().Find(args)
if cmd == nil || e != nil {
c.Printf("Unknown help topic %#q.", args)
c.Root().Usage()
} else {
err := cmd.Help()
if err != nil {
c.Println(err)
}
}
} }
} }
} }
...@@ -270,7 +268,7 @@ Global Flags: ...@@ -270,7 +268,7 @@ Global Flags:
{{.InheritedFlags.FlagUsages}}{{end}}{{if .HasHelpSubCommands}} {{.InheritedFlags.FlagUsages}}{{end}}{{if .HasHelpSubCommands}}
Additional help topics: {{range .Commands}}{{if .IsHelpCommand}} Additional help topics: {{range .Commands}}{{if .IsHelpCommand}}
{{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}}{{end}}{{end}}{{ if .HasSubCommands }} {{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{ if .HasSubCommands }}
Use "{{.CommandPath}} [command] --help" for more information about a command. Use "{{.CommandPath}} [command] --help" for more information about a command.
{{end}}` {{end}}`
...@@ -450,13 +448,24 @@ func (c *Command) execute(a []string) (err error) { ...@@ -450,13 +448,24 @@ func (c *Command) execute(a []string) (err error) {
c.Printf("Command %q is deprecated, %s\n", c.Name(), c.Deprecated) c.Printf("Command %q is deprecated, %s\n", c.Name(), c.Deprecated)
} }
// initialize help flag as the last point possible to allow for user
// overriding
c.initHelpFlag()
err = c.ParseFlags(a) err = c.ParseFlags(a)
if err != nil { if err != nil {
return err return err
} }
// If help is called, regardless of other flags, return we want help // If help is called, regardless of other flags, return we want help
// Also say we need help if c.Run is nil. // Also say we need help if the command isn't runnable.
if c.helpFlagVal || !c.Runnable() { helpVal, err := c.Flags().GetBool("help")
if err != nil {
// should be impossible to get here as we always declare a help
// flag in initHelpFlag()
c.Println("\"help\" flag declared as non-bool. Please correct your code")
return err
}
if helpVal || !c.Runnable() {
return flag.ErrHelp return flag.ErrHelp
} }
...@@ -464,22 +473,45 @@ func (c *Command) execute(a []string) (err error) { ...@@ -464,22 +473,45 @@ func (c *Command) execute(a []string) (err error) {
argWoFlags := c.Flags().Args() argWoFlags := c.Flags().Args()
for p := c; p != nil; p = p.Parent() { for p := c; p != nil; p = p.Parent() {
if p.PersistentPreRun != nil { if p.PersistentPreRunE != nil {
if err := p.PersistentPostRunE(c, argWoFlags); err != nil {
return err
}
break
} else if p.PersistentPreRun != nil {
p.PersistentPreRun(c, argWoFlags) p.PersistentPreRun(c, argWoFlags)
break break
} }
} }
if c.PreRun != nil { if c.PreRunE != nil {
if err := c.PreRunE(c, argWoFlags); err != nil {
return err
}
} else if c.PreRun != nil {
c.PreRun(c, argWoFlags) c.PreRun(c, argWoFlags)
} }
c.Run(c, argWoFlags) if c.RunE != nil {
if err := c.RunE(c, argWoFlags); err != nil {
if c.PostRun != nil { return err
}
} else {
c.Run(c, argWoFlags)
}
if c.PostRunE != nil {
if err := c.PostRunE(c, argWoFlags); err != nil {
return err
}
} else if c.PostRun != nil {
c.PostRun(c, argWoFlags) c.PostRun(c, argWoFlags)
} }
for p := c; p != nil; p = p.Parent() { for p := c; p != nil; p = p.Parent() {
if p.PersistentPostRun != nil { if p.PersistentPostRunE != nil {
if err := p.PersistentPostRunE(c, argWoFlags); err != nil {
return err
}
break
} else if p.PersistentPostRun != nil {
p.PersistentPostRun(c, argWoFlags) p.PersistentPostRun(c, argWoFlags)
break break
} }
...@@ -526,7 +558,7 @@ func (c *Command) Execute() (err error) { ...@@ -526,7 +558,7 @@ func (c *Command) Execute() (err error) {
// initialize help as the last point possible to allow for user // initialize help as the last point possible to allow for user
// overriding // overriding
c.initHelp() c.initHelpCmd()
var args []string var args []string
...@@ -550,7 +582,7 @@ func (c *Command) Execute() (err error) { ...@@ -550,7 +582,7 @@ func (c *Command) Execute() (err error) {
err = cmd.execute(flags) err = cmd.execute(flags)
if err != nil { if err != nil {
if err == flag.ErrHelp { if err == flag.ErrHelp {
cmd.Help() cmd.HelpFunc()(cmd, args)
return nil return nil
} }
c.Println(cmd.UsageString()) c.Println(cmd.UsageString())
...@@ -560,7 +592,13 @@ func (c *Command) Execute() (err error) { ...@@ -560,7 +592,13 @@ func (c *Command) Execute() (err error) {
return return
} }
func (c *Command) initHelp() { func (c *Command) initHelpFlag() {
if c.Flags().Lookup("help") == nil {
c.Flags().BoolP("help", "h", false, "help for "+c.Name())
}
}
func (c *Command) initHelpCmd() {
if c.helpCommand == nil { if c.helpCommand == nil {
if !c.HasSubCommands() { if !c.HasSubCommands() {
return return
...@@ -571,9 +609,19 @@ func (c *Command) initHelp() { ...@@ -571,9 +609,19 @@ func (c *Command) initHelp() {
Short: "Help about any command", Short: "Help about any command",
Long: `Help provides help for any command in the application. Long: `Help provides help for any command in the application.
Simply type ` + c.Name() + ` help [path to command] for full details.`, Simply type ` + c.Name() + ` help [path to command] for full details.`,
Run: c.HelpFunc(),
PersistentPreRun: func(cmd *Command, args []string) {}, PersistentPreRun: func(cmd *Command, args []string) {},
PersistentPostRun: func(cmd *Command, args []string) {}, PersistentPostRun: func(cmd *Command, args []string) {},
Run: func(c *Command, args []string) {
cmd, _, e := c.Root().Find(args)
if cmd == nil || e != nil {
c.Printf("Unknown help topic %#q.", args)
c.Root().Usage()
} else {
helpFunc := cmd.HelpFunc()
helpFunc(cmd, args)
}
},
} }
} }
c.AddCommand(c.helpCommand) c.AddCommand(c.helpCommand)
...@@ -794,7 +842,7 @@ func (c *Command) HasExample() bool { ...@@ -794,7 +842,7 @@ func (c *Command) HasExample() bool {
// Determine if the command is itself runnable // Determine if the command is itself runnable
func (c *Command) Runnable() bool { func (c *Command) Runnable() bool {
return c.Run != nil return c.Run != nil || c.RunE != nil
} }
// Determine if the command has children commands // Determine if the command has children commands
...@@ -859,7 +907,6 @@ func (c *Command) Flags() *flag.FlagSet { ...@@ -859,7 +907,6 @@ func (c *Command) Flags() *flag.FlagSet {
c.flagErrorBuf = new(bytes.Buffer) c.flagErrorBuf = new(bytes.Buffer)
} }
c.flags.SetOutput(c.flagErrorBuf) c.flags.SetOutput(c.flagErrorBuf)
c.PersistentFlags().BoolVarP(&c.helpFlagVal, "help", "h", false, "help for "+c.Name())
} }
return c.flags return c.flags
} }
......
// Copyright 2015 Red Hat Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cobra
import ()
// Test to see if we have a reason to print See Also information in docs
// Basically this is a test for a parent commend or a subcommand which is
// both not deprecated and not the autogenerated help command.
func (cmd *Command) hasSeeAlso() bool {
if cmd.HasParent() {
return true
}
children := cmd.Commands()
if len(children) == 0 {
return false
}
for _, c := range children {
if len(c.Deprecated) != 0 || c == cmd.helpCommand {
continue
}
return true
}
return false
}
// Copyright 2015 Red Hat Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cobra
import (
"bytes"
"fmt"
"os"
"sort"
"strings"
"time"
mangen "github.com/cpuguy83/go-md2man/md2man"
"github.com/spf13/pflag"
)
func GenManTree(cmd *Command, projectName, dir string) {
cmd.GenManTree(projectName, dir)
}
func (cmd *Command) GenManTree(projectName, dir string) {
for _, c := range cmd.Commands() {
if len(c.Deprecated) != 0 || c == cmd.helpCommand {
continue
}
GenManTree(c, projectName, dir)
}
out := new(bytes.Buffer)
cmd.GenMan(projectName, out)
filename := cmd.CommandPath()
filename = dir + strings.Replace(filename, " ", "-", -1) + ".1"
outFile, err := os.Create(filename)
if err != nil {
fmt.Println(err)
os.Exit(1)
}
defer outFile.Close()
_, err = outFile.Write(out.Bytes())
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}
func GenMan(cmd *Command, projectName string, out *bytes.Buffer) {
cmd.GenMan(projectName, out)
}
func (cmd *Command) GenMan(projectName string, out *bytes.Buffer) {
buf := genMarkdown(cmd, projectName)
final := mangen.Render(buf)
out.Write(final)
}
func manPreamble(out *bytes.Buffer, projectName, name, short, long string) {
fmt.Fprintf(out, `%% %s(1)
# NAME
`, projectName)
fmt.Fprintf(out, "%s \\- %s\n\n", name, short)
fmt.Fprintf(out, "# SYNOPSIS\n")
fmt.Fprintf(out, "**%s** [OPTIONS]\n\n", name)
fmt.Fprintf(out, "# DESCRIPTION\n")
fmt.Fprintf(out, "%s\n\n", long)
}
func manPrintFlags(out *bytes.Buffer, flags *pflag.FlagSet) {
flags.VisitAll(func(flag *pflag.Flag) {
if len(flag.Deprecated) > 0 {
return
}
format := ""
if len(flag.Shorthand) > 0 {
format = "**-%s**, **--%s**"
} else {
format = "%s**--%s**"
}
if len(flag.NoOptDefVal) > 0 {
format = format + "["
}
if flag.Value.Type() == "string" {
// put quotes on the value
format = format + "=%q"
} else {
format = format + "=%s"
}
if len(flag.NoOptDefVal) > 0 {
format = format + "]"
}
format = format + "\n\t%s\n\n"
fmt.Fprintf(out, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage)
})
}
func manPrintOptions(out *bytes.Buffer, command *Command) {
flags := command.NonInheritedFlags()
if flags.HasFlags() {
fmt.Fprintf(out, "# OPTIONS\n")
manPrintFlags(out, flags)
fmt.Fprintf(out, "\n")
}
flags = command.InheritedFlags()
if flags.HasFlags() {
fmt.Fprintf(out, "# OPTIONS INHERITED FROM PARENT COMMANDS\n")
manPrintFlags(out, flags)
fmt.Fprintf(out, "\n")
}
}
func genMarkdown(cmd *Command, projectName string) []byte {
// something like `rootcmd subcmd1 subcmd2`
commandName := cmd.CommandPath()
// something like `rootcmd-subcmd1-subcmd2`
dashCommandName := strings.Replace(commandName, " ", "-", -1)
buf := new(bytes.Buffer)
short := cmd.Short
long := cmd.Long
if len(long) == 0 {
long = short
}
manPreamble(buf, projectName, commandName, short, long)
manPrintOptions(buf, cmd)
if len(cmd.Example) > 0 {
fmt.Fprintf(buf, "# EXAMPLE\n")
fmt.Fprintf(buf, "```\n%s\n```\n", cmd.Example)
}
if cmd.hasSeeAlso() {
fmt.Fprintf(buf, "# SEE ALSO\n")
if cmd.HasParent() {
fmt.Fprintf(buf, "**%s(1)**, ", cmd.Parent().CommandPath())
}
children := cmd.Commands()
sort.Sort(byName(children))
for _, c := range children {
if len(c.Deprecated) != 0 || c == cmd.helpCommand {
continue
}
fmt.Fprintf(buf, "**%s-%s(1)**, ", dashCommandName, c.Name())
}
fmt.Fprintf(buf, "\n")
}
fmt.Fprintf(buf, "# HISTORY\n%s Auto generated by spf13/cobra\n", time.Now().UTC())
return buf.Bytes()
}
# Generating Man Pages For Your Own cobra.Command
Generating bash completions from a cobra command is incredibly easy. An example is as follows:
```go
package main
import (
"github.com/spf13/cobra"
)
func main() {
cmd := &cobra.Command{
Use: "test",
Short: "my test program",
}
cmd.GenManTree("/tmp")
}
```
That will get you a man page `/tmp/test.1`
package cobra
import (
"bytes"
"fmt"
"os"
"strings"
"testing"
)
var _ = fmt.Println
var _ = os.Stderr
func translate(in string) string {
return strings.Replace(in, "-", "\\-", -1)
}
func TestGenManDoc(t *testing.T) {
c := initializeWithRootCmd()
// Need two commands to run the command alphabetical sort
cmdEcho.AddCommand(cmdTimes, cmdEchoSub, cmdDeprecated)
c.AddCommand(cmdPrint, cmdEcho)
cmdRootWithRun.PersistentFlags().StringVarP(&flags2a, "rootflag", "r", "two", strtwoParentHelp)
out := new(bytes.Buffer)
// We generate on a subcommand so we have both subcommands and parents
cmdEcho.GenMan("PROJECT", out)
found := out.String()
// Our description
expected := translate(cmdEcho.Name())
if !strings.Contains(found, expected) {
t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found)
}
// Better have our example
expected = translate(cmdEcho.Name())
if !strings.Contains(found, expected) {
t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found)
}
// A local flag
expected = "boolone"
if !strings.Contains(found, expected) {
t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found)
}
// persistent flag on parent
expected = "rootflag"
if !strings.Contains(found, expected) {
t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found)
}
// We better output info about our parent
expected = translate(cmdRootWithRun.Name())
if !strings.Contains(found, expected) {
t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found)
}
// And about subcommands
expected = translate(cmdEchoSub.Name())
if !strings.Contains(found, expected) {
t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found)
}
unexpected := translate(cmdDeprecated.Name())
if strings.Contains(found, unexpected) {
t.Errorf("Unexpected response.\nFound: %v\nBut should not have!!\n", unexpected)
}
}
...@@ -47,10 +47,18 @@ func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } ...@@ -47,10 +47,18 @@ func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() } func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() }
func GenMarkdown(cmd *Command, out *bytes.Buffer) { func GenMarkdown(cmd *Command, out *bytes.Buffer) {
GenMarkdownCustom(cmd, out, func(s string) string { return s }) cmd.GenMarkdown(out)
}
func (cmd *Command) GenMarkdown(out *bytes.Buffer) {
cmd.GenMarkdownCustom(out, func(s string) string { return s })
} }
func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) { func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) {
cmd.GenMarkdownCustom(out, linkHandler)
}
func (cmd *Command) GenMarkdownCustom(out *bytes.Buffer, linkHandler func(string) string) {
name := cmd.CommandPath() name := cmd.CommandPath()
short := cmd.Short short := cmd.Short
...@@ -75,7 +83,7 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) ...@@ -75,7 +83,7 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string)
printOptions(out, cmd, name) printOptions(out, cmd, name)
if len(cmd.Commands()) > 0 || cmd.HasParent() { if cmd.hasSeeAlso() {
fmt.Fprintf(out, "### SEE ALSO\n") fmt.Fprintf(out, "### SEE ALSO\n")
if cmd.HasParent() { if cmd.HasParent() {
parent := cmd.Parent() parent := cmd.Parent()
...@@ -89,7 +97,7 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) ...@@ -89,7 +97,7 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string)
sort.Sort(byName(children)) sort.Sort(byName(children))
for _, child := range children { for _, child := range children {
if len(child.Deprecated) > 0 { if len(child.Deprecated) > 0 || child == cmd.helpCommand {
continue continue
} }
cname := name + " " + child.Name() cname := name + " " + child.Name()
...@@ -104,18 +112,29 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) ...@@ -104,18 +112,29 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string)
} }
func GenMarkdownTree(cmd *Command, dir string) { func GenMarkdownTree(cmd *Command, dir string) {
cmd.GenMarkdownTree(dir)
}
func (cmd *Command) GenMarkdownTree(dir string) {
identity := func(s string) string { return s } identity := func(s string) string { return s }
emptyStr := func(s string) string { return "" } emptyStr := func(s string) string { return "" }
GenMarkdownTreeCustom(cmd, dir, emptyStr, identity) cmd.GenMarkdownTreeCustom(dir, emptyStr, identity)
} }
func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string) string) { func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string) string) {
cmd.GenMarkdownTreeCustom(dir, filePrepender, linkHandler)
}
func (cmd *Command) GenMarkdownTreeCustom(dir string, filePrepender func(string) string, linkHandler func(string) string) {
for _, c := range cmd.Commands() { for _, c := range cmd.Commands() {
GenMarkdownTreeCustom(c, dir, filePrepender, linkHandler) if len(c.Deprecated) != 0 || c == cmd.helpCommand {
continue
}
c.GenMarkdownTreeCustom(dir, filePrepender, linkHandler)
} }
out := new(bytes.Buffer) out := new(bytes.Buffer)
GenMarkdownCustom(cmd, out, linkHandler) cmd.GenMarkdownCustom(out, linkHandler)
filename := cmd.CommandPath() filename := cmd.CommandPath()
filename = dir + strings.Replace(filename, " ", "_", -1) + ".md" filename = dir + strings.Replace(filename, " ", "_", -1) + ".md"
......
#!/bin/bash #!/bin/bash
__debug() __debug()
{ {
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
...@@ -8,6 +7,14 @@ __debug() ...@@ -8,6 +7,14 @@ __debug()
fi fi
} }
# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
# _init_completion. This is a very minimal version of that function.
__my_init_completion()
{
COMPREPLY=()
_get_comp_words_by_ref cur prev words cword
}
__index_of_word() __index_of_word()
{ {
local w word=$1 local w word=$1
...@@ -260,8 +267,6 @@ _kubectl_get() ...@@ -260,8 +267,6 @@ _kubectl_get()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--label-columns=") flags+=("--label-columns=")
two_word_flags+=("-L") two_word_flags+=("-L")
flags+=("--no-headers") flags+=("--no-headers")
...@@ -317,8 +322,6 @@ _kubectl_describe() ...@@ -317,8 +322,6 @@ _kubectl_describe()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--selector=") flags+=("--selector=")
two_word_flags+=("-l") two_word_flags+=("-l")
...@@ -354,8 +357,6 @@ _kubectl_create() ...@@ -354,8 +357,6 @@ _kubectl_create()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
flags+=("--validate") flags+=("--validate")
...@@ -385,8 +386,6 @@ _kubectl_replace() ...@@ -385,8 +386,6 @@ _kubectl_replace()
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--force") flags+=("--force")
flags+=("--grace-period=") flags+=("--grace-period=")
flags+=("--help")
flags+=("-h")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
flags+=("--timeout=") flags+=("--timeout=")
...@@ -414,8 +413,6 @@ _kubectl_patch() ...@@ -414,8 +413,6 @@ _kubectl_patch()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
flags+=("--patch=") flags+=("--patch=")
...@@ -446,8 +443,6 @@ _kubectl_delete() ...@@ -446,8 +443,6 @@ _kubectl_delete()
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--grace-period=") flags+=("--grace-period=")
flags+=("--help")
flags+=("-h")
flags+=("--ignore-not-found") flags+=("--ignore-not-found")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
...@@ -487,8 +482,6 @@ _kubectl_namespace() ...@@ -487,8 +482,6 @@ _kubectl_namespace()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -508,8 +501,6 @@ _kubectl_logs() ...@@ -508,8 +501,6 @@ _kubectl_logs()
two_word_flags+=("-c") two_word_flags+=("-c")
flags+=("--follow") flags+=("--follow")
flags+=("-f") flags+=("-f")
flags+=("--help")
flags+=("-h")
flags+=("--interactive") flags+=("--interactive")
flags+=("--previous") flags+=("--previous")
flags+=("-p") flags+=("-p")
...@@ -536,8 +527,6 @@ _kubectl_rolling-update() ...@@ -536,8 +527,6 @@ _kubectl_rolling-update()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--image=") flags+=("--image=")
flags+=("--no-headers") flags+=("--no-headers")
flags+=("--output=") flags+=("--output=")
...@@ -578,8 +567,6 @@ _kubectl_scale() ...@@ -578,8 +567,6 @@ _kubectl_scale()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
flags+=("--replicas=") flags+=("--replicas=")
...@@ -603,8 +590,6 @@ _kubectl_attach() ...@@ -603,8 +590,6 @@ _kubectl_attach()
flags+=("--container=") flags+=("--container=")
two_word_flags+=("-c") two_word_flags+=("-c")
flags+=("--help")
flags+=("-h")
flags+=("--stdin") flags+=("--stdin")
flags+=("-i") flags+=("-i")
flags+=("--tty") flags+=("--tty")
...@@ -626,8 +611,6 @@ _kubectl_exec() ...@@ -626,8 +611,6 @@ _kubectl_exec()
flags+=("--container=") flags+=("--container=")
two_word_flags+=("-c") two_word_flags+=("-c")
flags+=("--help")
flags+=("-h")
flags+=("--pod=") flags+=("--pod=")
two_word_flags+=("-p") two_word_flags+=("-p")
flags+=("--stdin") flags+=("--stdin")
...@@ -649,8 +632,6 @@ _kubectl_port-forward() ...@@ -649,8 +632,6 @@ _kubectl_port-forward()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
flags+=("--pod=") flags+=("--pod=")
two_word_flags+=("-p") two_word_flags+=("-p")
...@@ -672,8 +653,6 @@ _kubectl_proxy() ...@@ -672,8 +653,6 @@ _kubectl_proxy()
flags+=("--accept-paths=") flags+=("--accept-paths=")
flags+=("--api-prefix=") flags+=("--api-prefix=")
flags+=("--disable-filter") flags+=("--disable-filter")
flags+=("--help")
flags+=("-h")
flags+=("--port=") flags+=("--port=")
two_word_flags+=("-p") two_word_flags+=("-p")
flags+=("--reject-methods=") flags+=("--reject-methods=")
...@@ -703,8 +682,6 @@ _kubectl_run() ...@@ -703,8 +682,6 @@ _kubectl_run()
flags+=("--command") flags+=("--command")
flags+=("--dry-run") flags+=("--dry-run")
flags+=("--generator=") flags+=("--generator=")
flags+=("--help")
flags+=("-h")
flags+=("--hostport=") flags+=("--hostport=")
flags+=("--image=") flags+=("--image=")
flags+=("--labels=") flags+=("--labels=")
...@@ -750,8 +727,6 @@ _kubectl_stop() ...@@ -750,8 +727,6 @@ _kubectl_stop()
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--grace-period=") flags+=("--grace-period=")
flags+=("--help")
flags+=("-h")
flags+=("--ignore-not-found") flags+=("--ignore-not-found")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
...@@ -784,8 +759,6 @@ _kubectl_expose() ...@@ -784,8 +759,6 @@ _kubectl_expose()
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--generator=") flags+=("--generator=")
flags+=("--help")
flags+=("-h")
flags+=("--labels=") flags+=("--labels=")
two_word_flags+=("-l") two_word_flags+=("-l")
flags+=("--name=") flags+=("--name=")
...@@ -829,8 +802,6 @@ _kubectl_label() ...@@ -829,8 +802,6 @@ _kubectl_label()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--no-headers") flags+=("--no-headers")
flags+=("--output=") flags+=("--output=")
two_word_flags+=("-o") two_word_flags+=("-o")
...@@ -884,8 +855,6 @@ _kubectl_annotate() ...@@ -884,8 +855,6 @@ _kubectl_annotate()
two_word_flags+=("-f") two_word_flags+=("-f")
flags_with_completion+=("-f") flags_with_completion+=("-f")
flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml") flags_completion+=("__handle_filename_extension_flag json|stdin|yaml|yml")
flags+=("--help")
flags+=("-h")
flags+=("--overwrite") flags+=("--overwrite")
flags+=("--resource-version=") flags+=("--resource-version=")
...@@ -904,8 +873,6 @@ _kubectl_config_view() ...@@ -904,8 +873,6 @@ _kubectl_config_view()
flags_completion=() flags_completion=()
flags+=("--flatten") flags+=("--flatten")
flags+=("--help")
flags+=("-h")
flags+=("--merge") flags+=("--merge")
flags+=("--minify") flags+=("--minify")
flags+=("--no-headers") flags+=("--no-headers")
...@@ -936,8 +903,6 @@ _kubectl_config_set-cluster() ...@@ -936,8 +903,6 @@ _kubectl_config_set-cluster()
flags+=("--api-version=") flags+=("--api-version=")
flags+=("--certificate-authority=") flags+=("--certificate-authority=")
flags+=("--embed-certs") flags+=("--embed-certs")
flags+=("--help")
flags+=("-h")
flags+=("--insecure-skip-tls-verify") flags+=("--insecure-skip-tls-verify")
flags+=("--server=") flags+=("--server=")
...@@ -958,8 +923,6 @@ _kubectl_config_set-credentials() ...@@ -958,8 +923,6 @@ _kubectl_config_set-credentials()
flags+=("--client-certificate=") flags+=("--client-certificate=")
flags+=("--client-key=") flags+=("--client-key=")
flags+=("--embed-certs") flags+=("--embed-certs")
flags+=("--help")
flags+=("-h")
flags+=("--password=") flags+=("--password=")
flags+=("--token=") flags+=("--token=")
flags+=("--username=") flags+=("--username=")
...@@ -979,8 +942,6 @@ _kubectl_config_set-context() ...@@ -979,8 +942,6 @@ _kubectl_config_set-context()
flags_completion=() flags_completion=()
flags+=("--cluster=") flags+=("--cluster=")
flags+=("--help")
flags+=("-h")
flags+=("--namespace=") flags+=("--namespace=")
flags+=("--user=") flags+=("--user=")
...@@ -998,8 +959,6 @@ _kubectl_config_set() ...@@ -998,8 +959,6 @@ _kubectl_config_set()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -1015,8 +974,6 @@ _kubectl_config_unset() ...@@ -1015,8 +974,6 @@ _kubectl_config_unset()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -1032,8 +989,6 @@ _kubectl_config_use-context() ...@@ -1032,8 +989,6 @@ _kubectl_config_use-context()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -1056,8 +1011,6 @@ _kubectl_config() ...@@ -1056,8 +1011,6 @@ _kubectl_config()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
flags+=("--kubeconfig=") flags+=("--kubeconfig=")
must_have_one_flag=() must_have_one_flag=()
...@@ -1074,8 +1027,6 @@ _kubectl_cluster-info() ...@@ -1074,8 +1027,6 @@ _kubectl_cluster-info()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -1091,8 +1042,6 @@ _kubectl_api-versions() ...@@ -1091,8 +1042,6 @@ _kubectl_api-versions()
flags_with_completion=() flags_with_completion=()
flags_completion=() flags_completion=()
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -1110,8 +1059,6 @@ _kubectl_version() ...@@ -1110,8 +1059,6 @@ _kubectl_version()
flags+=("--client") flags+=("--client")
flags+=("-c") flags+=("-c")
flags+=("--help")
flags+=("-h")
must_have_one_flag=() must_have_one_flag=()
must_have_one_noun=() must_have_one_noun=()
...@@ -1157,8 +1104,6 @@ _kubectl() ...@@ -1157,8 +1104,6 @@ _kubectl()
flags+=("--client-key=") flags+=("--client-key=")
flags+=("--cluster=") flags+=("--cluster=")
flags+=("--context=") flags+=("--context=")
flags+=("--help")
flags+=("-h")
flags+=("--insecure-skip-tls-verify") flags+=("--insecure-skip-tls-verify")
flags+=("--kubeconfig=") flags+=("--kubeconfig=")
flags+=("--log-backtrace-at=") flags+=("--log-backtrace-at=")
...@@ -1184,7 +1129,11 @@ _kubectl() ...@@ -1184,7 +1129,11 @@ _kubectl()
__start_kubectl() __start_kubectl()
{ {
local cur prev words cword local cur prev words cword
_init_completion -s || return if declare -F _init_completions >/dev/null 2>&1; then
_init_completion -s || return
else
__my_init_completion || return
fi
local c=0 local c=0
local flags=() local flags=()
......
...@@ -38,10 +38,6 @@ resourcequotas (quota) or secrets. ...@@ -38,10 +38,6 @@ resourcequotas (quota) or secrets.
Filename, directory, or URL to a file identifying the resource to update the annotation Filename, directory, or URL to a file identifying the resource to update the annotation
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for annotate
.PP
\fB\-\-overwrite\fP=false \fB\-\-overwrite\fP=false
If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations. If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
......
...@@ -16,12 +16,6 @@ kubectl api\-versions \- Print available API versions. ...@@ -16,12 +16,6 @@ kubectl api\-versions \- Print available API versions.
Print available API versions. Print available API versions.
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for api\-versions
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
\fB\-\-alsologtostderr\fP=false \fB\-\-alsologtostderr\fP=false
......
...@@ -22,10 +22,6 @@ Attach to a a process that is already running inside an existing container. ...@@ -22,10 +22,6 @@ Attach to a a process that is already running inside an existing container.
Container name Container name
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for attach
.PP
\fB\-i\fP, \fB\-\-stdin\fP=false \fB\-i\fP, \fB\-\-stdin\fP=false
Pass stdin to the container Pass stdin to the container
......
...@@ -16,12 +16,6 @@ kubectl cluster\-info \- Display cluster info ...@@ -16,12 +16,6 @@ kubectl cluster\-info \- Display cluster info
Display addresses of the master and services with label kubernetes.io/cluster\-service=true Display addresses of the master and services with label kubernetes.io/cluster\-service=true
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for cluster\-info
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
\fB\-\-alsologtostderr\fP=false \fB\-\-alsologtostderr\fP=false
......
...@@ -31,10 +31,6 @@ Specifying a name that already exists will merge new fields on top of existing v ...@@ -31,10 +31,6 @@ Specifying a name that already exists will merge new fields on top of existing v
embed\-certs for the cluster entry in kubeconfig embed\-certs for the cluster entry in kubeconfig
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for set\-cluster
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false \fB\-\-insecure\-skip\-tls\-verify\fP=false
insecure\-skip\-tls\-verify for the cluster entry in kubeconfig insecure\-skip\-tls\-verify for the cluster entry in kubeconfig
......
...@@ -23,10 +23,6 @@ Specifying a name that already exists will merge new fields on top of existing v ...@@ -23,10 +23,6 @@ Specifying a name that already exists will merge new fields on top of existing v
cluster for the context entry in kubeconfig cluster for the context entry in kubeconfig
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for set\-context
.PP
\fB\-\-namespace\fP="" \fB\-\-namespace\fP=""
namespace for the context entry in kubeconfig namespace for the context entry in kubeconfig
......
...@@ -46,10 +46,6 @@ Bearer token and basic auth are mutually exclusive. ...@@ -46,10 +46,6 @@ Bearer token and basic auth are mutually exclusive.
embed client cert/key for the user entry in kubeconfig embed client cert/key for the user entry in kubeconfig
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for set\-credentials
.PP
\fB\-\-password\fP="" \fB\-\-password\fP=""
password for the user entry in kubeconfig password for the user entry in kubeconfig
......
...@@ -18,12 +18,6 @@ PROPERTY\_NAME is a dot delimited name where each token represents either a attr ...@@ -18,12 +18,6 @@ PROPERTY\_NAME is a dot delimited name where each token represents either a attr
PROPERTY\_VALUE is the new value you wish to set. PROPERTY\_VALUE is the new value you wish to set.
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for set
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
\fB\-\-alsologtostderr\fP=false \fB\-\-alsologtostderr\fP=false
......
...@@ -17,12 +17,6 @@ Unsets an individual value in a kubeconfig file ...@@ -17,12 +17,6 @@ Unsets an individual value in a kubeconfig file
PROPERTY\_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots. PROPERTY\_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for unset
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
\fB\-\-alsologtostderr\fP=false \fB\-\-alsologtostderr\fP=false
......
...@@ -16,12 +16,6 @@ kubectl config use\-context \- Sets the current\-context in a kubeconfig file ...@@ -16,12 +16,6 @@ kubectl config use\-context \- Sets the current\-context in a kubeconfig file
Sets the current\-context in a kubeconfig file Sets the current\-context in a kubeconfig file
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for use\-context
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
\fB\-\-alsologtostderr\fP=false \fB\-\-alsologtostderr\fP=false
......
...@@ -25,10 +25,6 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values ...@@ -25,10 +25,6 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files) flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files)
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for view
.PP
\fB\-\-merge\fP=true \fB\-\-merge\fP=true
merge together the full hierarchy of kubeconfig files merge together the full hierarchy of kubeconfig files
......
...@@ -24,10 +24,6 @@ The loading order follows these rules: ...@@ -24,10 +24,6 @@ The loading order follows these rules:
.SH OPTIONS .SH OPTIONS
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for config
.PP
\fB\-\-kubeconfig\fP="" \fB\-\-kubeconfig\fP=""
use a particular kubeconfig file use a particular kubeconfig file
......
...@@ -25,10 +25,6 @@ JSON and YAML formats are accepted. ...@@ -25,10 +25,6 @@ JSON and YAML formats are accepted.
Filename, directory, or URL to file to use to create the resource Filename, directory, or URL to file to use to create the resource
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for create
.PP
\fB\-o\fP, \fB\-\-output\fP="" \fB\-o\fP, \fB\-\-output\fP=""
Output mode. Use "\-o name" for shorter output (resource/name). Output mode. Use "\-o name" for shorter output (resource/name).
......
...@@ -45,10 +45,6 @@ will be lost along with the rest of the resource. ...@@ -45,10 +45,6 @@ will be lost along with the rest of the resource.
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for delete
.PP
\fB\-\-ignore\-not\-found\fP=false \fB\-\-ignore\-not\-found\fP=false
Treat "resource not found" as a successful delete. Defaults to "true" when \-\-all is specified. Treat "resource not found" as a successful delete. Defaults to "true" when \-\-all is specified.
......
...@@ -39,10 +39,6 @@ namespaces (ns) or secrets. ...@@ -39,10 +39,6 @@ namespaces (ns) or secrets.
Filename, directory, or URL to a file containing the resource to describe Filename, directory, or URL to a file containing the resource to describe
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for describe
.PP
\fB\-l\fP, \fB\-\-selector\fP="" \fB\-l\fP, \fB\-\-selector\fP=""
Selector (label query) to filter on Selector (label query) to filter on
......
...@@ -22,10 +22,6 @@ Execute a command in a container. ...@@ -22,10 +22,6 @@ Execute a command in a container.
Container name. If omitted, the first container in the pod will be chosen Container name. If omitted, the first container in the pod will be chosen
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for exec
.PP
\fB\-p\fP, \fB\-\-pod\fP="" \fB\-p\fP, \fB\-\-pod\fP=""
Pod name Pod name
......
...@@ -47,10 +47,6 @@ re\-use the labels from the resource it exposes. ...@@ -47,10 +47,6 @@ re\-use the labels from the resource it exposes.
The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'. The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for expose
.PP
\fB\-l\fP, \fB\-\-labels\fP="" \fB\-l\fP, \fB\-\-labels\fP=""
Labels to apply to the service created by this call. Labels to apply to the service created by this call.
......
...@@ -36,10 +36,6 @@ of the \-\-template flag, you can filter the attributes of the fetched resource( ...@@ -36,10 +36,6 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
Filename, directory, or URL to a file identifying the resource to get from a server. Filename, directory, or URL to a file identifying the resource to get from a server.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for get
.PP
\fB\-L\fP, \fB\-\-label\-columns\fP=[] \fB\-L\fP, \fB\-\-label\-columns\fP=[]
Accepts a comma separated list of labels that are going to be presented as columns. Names are case\-sensitive. You can also use multiple flag statements like \-L label1 \-L label2... Accepts a comma separated list of labels that are going to be presented as columns. Names are case\-sensitive. You can also use multiple flag statements like \-L label1 \-L label2...
......
...@@ -35,10 +35,6 @@ If \-\-resource\-version is specified, then updates will use this resource versi ...@@ -35,10 +35,6 @@ If \-\-resource\-version is specified, then updates will use this resource versi
Filename, directory, or URL to a file identifying the resource to update the labels Filename, directory, or URL to a file identifying the resource to update the labels
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for label
.PP
\fB\-\-no\-headers\fP=false \fB\-\-no\-headers\fP=false
When using the default output, don't print headers. When using the default output, don't print headers.
......
...@@ -26,10 +26,6 @@ Print the logs for a container in a pod. If the pod has only one container, the ...@@ -26,10 +26,6 @@ Print the logs for a container in a pod. If the pod has only one container, the
Specify if the logs should be streamed. Specify if the logs should be streamed.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for logs
.PP
\fB\-\-interactive\fP=true \fB\-\-interactive\fP=true
If true, prompt the user for input when required. Default true. If true, prompt the user for input when required. Default true.
......
...@@ -19,12 +19,6 @@ SUPERSEDED: Set and view the current Kubernetes namespace scope for command lin ...@@ -19,12 +19,6 @@ SUPERSEDED: Set and view the current Kubernetes namespace scope for command lin
namespace has been superseded by the context.namespace field of .kubeconfig files. See 'kubectl config set\-context \-\-help' for more details. namespace has been superseded by the context.namespace field of .kubeconfig files. See 'kubectl config set\-context \-\-help' for more details.
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for namespace
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
\fB\-\-alsologtostderr\fP=false \fB\-\-alsologtostderr\fP=false
......
...@@ -29,10 +29,6 @@ Please refer to the models in ...@@ -29,10 +29,6 @@ Please refer to the models in
Filename, directory, or URL to a file identifying the resource to update Filename, directory, or URL to a file identifying the resource to update
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for patch
.PP
\fB\-o\fP, \fB\-\-output\fP="" \fB\-o\fP, \fB\-\-output\fP=""
Output mode. Use "\-o name" for shorter output (resource/name). Output mode. Use "\-o name" for shorter output (resource/name).
......
...@@ -18,10 +18,6 @@ Forward one or more local ports to a pod. ...@@ -18,10 +18,6 @@ Forward one or more local ports to a pod.
.SH OPTIONS .SH OPTIONS
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for port\-forward
.PP
\fB\-p\fP, \fB\-\-pod\fP="" \fB\-p\fP, \fB\-\-pod\fP=""
Pod name Pod name
......
...@@ -55,10 +55,6 @@ The above lets you 'curl localhost:8001/custom/api/v1/pods' ...@@ -55,10 +55,6 @@ The above lets you 'curl localhost:8001/custom/api/v1/pods'
If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port. If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for proxy
.PP
\fB\-p\fP, \fB\-\-port\fP=8001 \fB\-p\fP, \fB\-\-port\fP=8001
The port on which to run the proxy. Set to 0 to pick a random port. The port on which to run the proxy. Set to 0 to pick a random port.
......
...@@ -43,10 +43,6 @@ Please refer to the models in ...@@ -43,10 +43,6 @@ Please refer to the models in
Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative. Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for replace
.PP
\fB\-o\fP, \fB\-\-output\fP="" \fB\-o\fP, \fB\-\-output\fP=""
Output mode. Use "\-o name" for shorter output (resource/name). Output mode. Use "\-o name" for shorter output (resource/name).
......
...@@ -35,10 +35,6 @@ existing replication controller and overwrite at least one (common) label in its ...@@ -35,10 +35,6 @@ existing replication controller and overwrite at least one (common) label in its
Filename or URL to file to use to create the new replication controller. Filename or URL to file to use to create the new replication controller.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for rolling\-update
.PP
\fB\-\-image\fP="" \fB\-\-image\fP=""
Image to use for upgrading the replication controller. Can not be used with \-\-filename/\-f Image to use for upgrading the replication controller. Can not be used with \-\-filename/\-f
......
...@@ -35,10 +35,6 @@ Creates a replication controller to manage the created container(s). ...@@ -35,10 +35,6 @@ Creates a replication controller to manage the created container(s).
The name of the API generator to use. Default is 'run/v1' if \-\-restart=Always, otherwise the default is 'run\-pod/v1'. The name of the API generator to use. Default is 'run/v1' if \-\-restart=Always, otherwise the default is 'run\-pod/v1'.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for run
.PP
\fB\-\-hostport\fP=\-1 \fB\-\-hostport\fP=\-1
The host port mapping for the container port. To demonstrate a single\-machine container. The host port mapping for the container port. To demonstrate a single\-machine container.
......
...@@ -32,10 +32,6 @@ scale is sent to the server. ...@@ -32,10 +32,6 @@ scale is sent to the server.
Filename, directory, or URL to a file identifying the replication controller to set a new size Filename, directory, or URL to a file identifying the replication controller to set a new size
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for scale
.PP
\fB\-o\fP, \fB\-\-output\fP="" \fB\-o\fP, \fB\-\-output\fP=""
Output mode. Use "\-o name" for shorter output (resource/name). Output mode. Use "\-o name" for shorter output (resource/name).
......
...@@ -38,10 +38,6 @@ If the resource is scalable it will be scaled to 0 before deletion. ...@@ -38,10 +38,6 @@ If the resource is scalable it will be scaled to 0 before deletion.
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for stop
.PP
\fB\-\-ignore\-not\-found\fP=false \fB\-\-ignore\-not\-found\fP=false
Treat "resource not found" as a successful stop. Treat "resource not found" as a successful stop.
......
...@@ -21,10 +21,6 @@ Print the client and server version information. ...@@ -21,10 +21,6 @@ Print the client and server version information.
\fB\-c\fP, \fB\-\-client\fP=false \fB\-c\fP, \fB\-\-client\fP=false
Client version only (no server required). Client version only (no server required).
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for version
.SH OPTIONS INHERITED FROM PARENT COMMANDS .SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP .PP
......
...@@ -50,10 +50,6 @@ Find more information at ...@@ -50,10 +50,6 @@ Find more information at
The name of the kubeconfig context to use The name of the kubeconfig context to use
.PP .PP
\fB\-h\fP, \fB\-\-help\fP=false
help for kubectl
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false \fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
......
...@@ -56,7 +56,6 @@ kubectl ...@@ -56,7 +56,6 @@ kubectl
--client-key="": Path to a client key file for TLS. --client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use --cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use --context="": The name of the kubeconfig context to use
-h, --help[=false]: help for kubectl
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. --insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": Path to the kubeconfig file to use for CLI requests. --kubeconfig="": Path to the kubeconfig file to use for CLI requests.
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace --log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
...@@ -101,7 +100,7 @@ kubectl ...@@ -101,7 +100,7 @@ kubectl
* [kubectl stop](kubectl_stop.md) - Deprecated: Gracefully shut down a resource by name or filename. * [kubectl stop](kubectl_stop.md) - Deprecated: Gracefully shut down a resource by name or filename.
* [kubectl version](kubectl_version.md) - Print the client and server version information. * [kubectl version](kubectl_version.md) - Print the client and server version information.
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.169032754 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476725335 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]()
......
...@@ -83,7 +83,6 @@ $ kubectl annotate pods foo description- ...@@ -83,7 +83,6 @@ $ kubectl annotate pods foo description-
``` ```
--all[=false]: select all resources in the namespace of the specified resource types --all[=false]: select all resources in the namespace of the specified resource types
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the annotation -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the annotation
-h, --help[=false]: help for annotate
--overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations. --overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
--resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource. --resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
``` ```
...@@ -120,7 +119,7 @@ $ kubectl annotate pods foo description- ...@@ -120,7 +119,7 @@ $ kubectl annotate pods foo description-
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-27 02:40:25.687121316 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.474197531 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_annotate.md?pixel)]()
......
...@@ -44,12 +44,6 @@ Print available API versions. ...@@ -44,12 +44,6 @@ Print available API versions.
kubectl api-versions kubectl api-versions
``` ```
### Options
```
-h, --help[=false]: help for api-versions
```
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
...@@ -82,7 +76,7 @@ kubectl api-versions ...@@ -82,7 +76,7 @@ kubectl api-versions
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168773226 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476265479 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_api-versions.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_api-versions.md?pixel)]()
......
...@@ -62,7 +62,6 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t ...@@ -62,7 +62,6 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t
``` ```
-c, --container="": Container name -c, --container="": Container name
-h, --help[=false]: help for attach
-i, --stdin[=false]: Pass stdin to the container -i, --stdin[=false]: Pass stdin to the container
-t, --tty[=false]: Stdin is a TTY -t, --tty[=false]: Stdin is a TTY
``` ```
...@@ -99,7 +98,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t ...@@ -99,7 +98,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-02 09:55:50.948089316 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.471309711 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_attach.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_attach.md?pixel)]()
......
...@@ -44,12 +44,6 @@ Display addresses of the master and services with label kubernetes.io/cluster-se ...@@ -44,12 +44,6 @@ Display addresses of the master and services with label kubernetes.io/cluster-se
kubectl cluster-info kubectl cluster-info
``` ```
### Options
```
-h, --help[=false]: help for cluster-info
```
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
...@@ -82,7 +76,7 @@ kubectl cluster-info ...@@ -82,7 +76,7 @@ kubectl cluster-info
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168659453 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476078738 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_cluster-info.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_cluster-info.md?pixel)]()
......
...@@ -53,7 +53,6 @@ kubectl config SUBCOMMAND ...@@ -53,7 +53,6 @@ kubectl config SUBCOMMAND
### Options ### Options
``` ```
-h, --help[=false]: help for config
--kubeconfig="": use a particular kubeconfig file --kubeconfig="": use a particular kubeconfig file
``` ```
...@@ -95,7 +94,7 @@ kubectl config SUBCOMMAND ...@@ -95,7 +94,7 @@ kubectl config SUBCOMMAND
* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file * [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file
* [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file. * [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file.
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.16853102 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475888484 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config.md?pixel)]()
......
...@@ -64,7 +64,6 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true ...@@ -64,7 +64,6 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
--api-version="": api-version for the cluster entry in kubeconfig --api-version="": api-version for the cluster entry in kubeconfig
--certificate-authority="": path to certificate-authority for the cluster entry in kubeconfig --certificate-authority="": path to certificate-authority for the cluster entry in kubeconfig
--embed-certs=false: embed-certs for the cluster entry in kubeconfig --embed-certs=false: embed-certs for the cluster entry in kubeconfig
-h, --help[=false]: help for set-cluster
--insecure-skip-tls-verify=false: insecure-skip-tls-verify for the cluster entry in kubeconfig --insecure-skip-tls-verify=false: insecure-skip-tls-verify for the cluster entry in kubeconfig
--server="": server for the cluster entry in kubeconfig --server="": server for the cluster entry in kubeconfig
``` ```
...@@ -97,7 +96,7 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true ...@@ -97,7 +96,7 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.167359915 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.474677631 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-cluster.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-cluster.md?pixel)]()
......
...@@ -56,7 +56,6 @@ $ kubectl config set-context gce --user=cluster-admin ...@@ -56,7 +56,6 @@ $ kubectl config set-context gce --user=cluster-admin
``` ```
--cluster="": cluster for the context entry in kubeconfig --cluster="": cluster for the context entry in kubeconfig
-h, --help[=false]: help for set-context
--namespace="": namespace for the context entry in kubeconfig --namespace="": namespace for the context entry in kubeconfig
--user="": user for the context entry in kubeconfig --user="": user for the context entry in kubeconfig
``` ```
...@@ -90,7 +89,7 @@ $ kubectl config set-context gce --user=cluster-admin ...@@ -90,7 +89,7 @@ $ kubectl config set-context gce --user=cluster-admin
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168034038 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475093212 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-context.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-context.md?pixel)]()
......
...@@ -77,7 +77,6 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi ...@@ -77,7 +77,6 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi
--client-certificate="": path to client-certificate for the user entry in kubeconfig --client-certificate="": path to client-certificate for the user entry in kubeconfig
--client-key="": path to client-key for the user entry in kubeconfig --client-key="": path to client-key for the user entry in kubeconfig
--embed-certs=false: embed client cert/key for the user entry in kubeconfig --embed-certs=false: embed client cert/key for the user entry in kubeconfig
-h, --help[=false]: help for set-credentials
--password="": password for the user entry in kubeconfig --password="": password for the user entry in kubeconfig
--token="": token for the user entry in kubeconfig --token="": token for the user entry in kubeconfig
--username="": username for the user entry in kubeconfig --username="": username for the user entry in kubeconfig
...@@ -110,7 +109,7 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi ...@@ -110,7 +109,7 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.167500874 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.474882527 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-credentials.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set-credentials.md?pixel)]()
......
...@@ -46,12 +46,6 @@ PROPERTY_VALUE is the new value you wish to set. ...@@ -46,12 +46,6 @@ PROPERTY_VALUE is the new value you wish to set.
kubectl config set PROPERTY_NAME PROPERTY_VALUE kubectl config set PROPERTY_NAME PROPERTY_VALUE
``` ```
### Options
```
-h, --help[=false]: help for set
```
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
...@@ -84,7 +78,7 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE ...@@ -84,7 +78,7 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.16816699 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475281504 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_set.md?pixel)]()
......
...@@ -45,12 +45,6 @@ PROPERTY_NAME is a dot delimited name where each token represents either a attri ...@@ -45,12 +45,6 @@ PROPERTY_NAME is a dot delimited name where each token represents either a attri
kubectl config unset PROPERTY_NAME kubectl config unset PROPERTY_NAME
``` ```
### Options
```
-h, --help[=false]: help for unset
```
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
...@@ -83,7 +77,7 @@ kubectl config unset PROPERTY_NAME ...@@ -83,7 +77,7 @@ kubectl config unset PROPERTY_NAME
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168279315 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475473658 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_unset.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_unset.md?pixel)]()
......
...@@ -44,12 +44,6 @@ Sets the current-context in a kubeconfig file ...@@ -44,12 +44,6 @@ Sets the current-context in a kubeconfig file
kubectl config use-context CONTEXT_NAME kubectl config use-context CONTEXT_NAME
``` ```
### Options
```
-h, --help[=false]: help for use-context
```
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
...@@ -82,7 +76,7 @@ kubectl config use-context CONTEXT_NAME ...@@ -82,7 +76,7 @@ kubectl config use-context CONTEXT_NAME
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168411074 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475674294 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_use-context.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_use-context.md?pixel)]()
......
...@@ -60,7 +60,6 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2 ...@@ -60,7 +60,6 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
``` ```
--flatten[=false]: flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files) --flatten[=false]: flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files)
-h, --help[=false]: help for view
--merge=true: merge together the full hierarchy of kubeconfig files --merge=true: merge together the full hierarchy of kubeconfig files
--minify[=false]: remove all information not used by current-context from the output --minify[=false]: remove all information not used by current-context from the output
--no-headers[=false]: When using the default output, don't print headers. --no-headers[=false]: When using the default output, don't print headers.
...@@ -104,7 +103,7 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2 ...@@ -104,7 +103,7 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files * [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-08-26 09:03:39.977436672 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.474467216 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_view.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_config_view.md?pixel)]()
......
...@@ -60,7 +60,6 @@ $ cat pod.json | kubectl create -f - ...@@ -60,7 +60,6 @@ $ cat pod.json | kubectl create -f -
``` ```
-f, --filename=[]: Filename, directory, or URL to file to use to create the resource -f, --filename=[]: Filename, directory, or URL to file to use to create the resource
-h, --help[=false]: help for create
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
--validate[=true]: If true, use a schema to validate the input before sending it --validate[=true]: If true, use a schema to validate the input before sending it
``` ```
...@@ -97,7 +96,7 @@ $ cat pod.json | kubectl create -f - ...@@ -97,7 +96,7 @@ $ cat pod.json | kubectl create -f -
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-27 08:49:26.55743532 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.469492371 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_create.md?pixel)]()
......
...@@ -81,7 +81,6 @@ $ kubectl delete pods --all ...@@ -81,7 +81,6 @@ $ kubectl delete pods --all
--cascade[=true]: If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true. --cascade[=true]: If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
-f, --filename=[]: Filename, directory, or URL to a file containing the resource to delete. -f, --filename=[]: Filename, directory, or URL to a file containing the resource to delete.
--grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. --grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
-h, --help[=false]: help for delete
--ignore-not-found[=false]: Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified. --ignore-not-found[=false]: Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
-l, --selector="": Selector (label query) to filter on. -l, --selector="": Selector (label query) to filter on.
...@@ -120,7 +119,7 @@ $ kubectl delete pods --all ...@@ -120,7 +119,7 @@ $ kubectl delete pods --all
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-25 10:17:24.591839542 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.470182255 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_delete.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_delete.md?pixel)]()
......
...@@ -84,7 +84,6 @@ $ kubectl describe pods frontend ...@@ -84,7 +84,6 @@ $ kubectl describe pods frontend
``` ```
-f, --filename=[]: Filename, directory, or URL to a file containing the resource to describe -f, --filename=[]: Filename, directory, or URL to a file containing the resource to describe
-h, --help[=false]: help for describe
-l, --selector="": Selector (label query) to filter on -l, --selector="": Selector (label query) to filter on
``` ```
...@@ -120,7 +119,7 @@ $ kubectl describe pods frontend ...@@ -120,7 +119,7 @@ $ kubectl describe pods frontend
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 07:07:55.972896481 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.469291072 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_describe.md?pixel)]()
......
...@@ -62,7 +62,6 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il ...@@ -62,7 +62,6 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
``` ```
-c, --container="": Container name. If omitted, the first container in the pod will be chosen -c, --container="": Container name. If omitted, the first container in the pod will be chosen
-h, --help[=false]: help for exec
-p, --pod="": Pod name -p, --pod="": Pod name
-i, --stdin[=false]: Pass stdin to the container -i, --stdin[=false]: Pass stdin to the container
-t, --tty[=false]: Stdin is a TTY -t, --tty[=false]: Stdin is a TTY
...@@ -100,7 +99,7 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il ...@@ -100,7 +99,7 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-02 09:55:50.948300118 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.471517301 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_exec.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_exec.md?pixel)]()
......
...@@ -72,7 +72,6 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream ...@@ -72,7 +72,6 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
--external-ip="": External IP address to set for the service. The service can be accessed by this IP in addition to its generated service IP. --external-ip="": External IP address to set for the service. The service can be accessed by this IP in addition to its generated service IP.
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to expose a service -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to expose a service
--generator="service/v2": The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'. --generator="service/v2": The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'.
-h, --help[=false]: help for expose
-l, --labels="": Labels to apply to the service created by this call. -l, --labels="": Labels to apply to the service created by this call.
--name="": The name for the newly created object. --name="": The name for the newly created object.
--no-headers[=false]: When using the default output, don't print headers. --no-headers[=false]: When using the default output, don't print headers.
...@@ -122,7 +121,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream ...@@ -122,7 +121,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-03 03:58:51.196935872 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.473647619 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]()
......
...@@ -88,7 +88,6 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7 ...@@ -88,7 +88,6 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
``` ```
--all-namespaces[=false]: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. --all-namespaces[=false]: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server. -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to get from a server.
-h, --help[=false]: help for get
-L, --label-columns=[]: Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag statements like -L label1 -L label2... -L, --label-columns=[]: Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag statements like -L label1 -L label2...
--no-headers[=false]: When using the default output, don't print headers. --no-headers[=false]: When using the default output, don't print headers.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name. -o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
...@@ -133,7 +132,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7 ...@@ -133,7 +132,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-26 09:03:39.972870101 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.469014739 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_get.md?pixel)]()
......
...@@ -77,7 +77,6 @@ $ kubectl label pods foo bar- ...@@ -77,7 +77,6 @@ $ kubectl label pods foo bar-
--all[=false]: select all resources in the namespace of the specified resource types --all[=false]: select all resources in the namespace of the specified resource types
--dry-run[=false]: If true, only print the object that would be sent, without sending it. --dry-run[=false]: If true, only print the object that would be sent, without sending it.
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the labels -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the labels
-h, --help[=false]: help for label
--no-headers[=false]: When using the default output, don't print headers. --no-headers[=false]: When using the default output, don't print headers.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name. -o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
--output-version="": Output the formatted object with the given version (default api-version). --output-version="": Output the formatted object with the given version (default api-version).
...@@ -121,7 +120,7 @@ $ kubectl label pods foo bar- ...@@ -121,7 +120,7 @@ $ kubectl label pods foo bar-
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-31 12:51:55.222410248 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-04 23:19:55.649428669 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_label.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_label.md?pixel)]()
......
...@@ -62,7 +62,6 @@ $ kubectl logs -f 123456-7890 ruby-container ...@@ -62,7 +62,6 @@ $ kubectl logs -f 123456-7890 ruby-container
``` ```
-c, --container="": Container name -c, --container="": Container name
-f, --follow[=false]: Specify if the logs should be streamed. -f, --follow[=false]: Specify if the logs should be streamed.
-h, --help[=false]: help for logs
--interactive[=true]: If true, prompt the user for input when required. Default true. --interactive[=true]: If true, prompt the user for input when required. Default true.
-p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod if it exists. -p, --previous[=false]: If true, print the logs for the previous instance of the container in a pod if it exists.
``` ```
...@@ -99,7 +98,7 @@ $ kubectl logs -f 123456-7890 ruby-container ...@@ -99,7 +98,7 @@ $ kubectl logs -f 123456-7890 ruby-container
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-02 09:55:50.94749958 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.470591683 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_logs.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_logs.md?pixel)]()
......
...@@ -47,12 +47,6 @@ namespace has been superseded by the context.namespace field of .kubeconfig file ...@@ -47,12 +47,6 @@ namespace has been superseded by the context.namespace field of .kubeconfig file
kubectl namespace [namespace] kubectl namespace [namespace]
``` ```
### Options
```
-h, --help[=false]: help for namespace
```
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
...@@ -85,7 +79,7 @@ kubectl namespace [namespace] ...@@ -85,7 +79,7 @@ kubectl namespace [namespace]
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.164903046 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.470380367 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_namespace.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_namespace.md?pixel)]()
......
...@@ -66,7 +66,6 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve ...@@ -66,7 +66,6 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
``` ```
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update
-h, --help[=false]: help for patch
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
-p, --patch="": The patch to be applied to the resource JSON file. -p, --patch="": The patch to be applied to the resource JSON file.
``` ```
...@@ -103,7 +102,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve ...@@ -103,7 +102,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.164613432 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.469927571 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]()
......
...@@ -64,7 +64,6 @@ $ kubectl port-forward mypod 0:5000 ...@@ -64,7 +64,6 @@ $ kubectl port-forward mypod 0:5000
### Options ### Options
``` ```
-h, --help[=false]: help for port-forward
-p, --pod="": Pod name -p, --pod="": Pod name
``` ```
...@@ -100,7 +99,7 @@ $ kubectl port-forward mypod 0:5000 ...@@ -100,7 +99,7 @@ $ kubectl port-forward mypod 0:5000
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-02 09:55:50.948456523 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.471732563 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_port-forward.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_port-forward.md?pixel)]()
......
...@@ -81,7 +81,6 @@ $ kubectl proxy --api-prefix=/k8s-api ...@@ -81,7 +81,6 @@ $ kubectl proxy --api-prefix=/k8s-api
--accept-paths="^/.*": Regular expression for paths that the proxy should accept. --accept-paths="^/.*": Regular expression for paths that the proxy should accept.
--api-prefix="/api/": Prefix to serve the proxied API under. --api-prefix="/api/": Prefix to serve the proxied API under.
--disable-filter[=false]: If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port. --disable-filter[=false]: If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port.
-h, --help[=false]: help for proxy
-p, --port=8001: The port on which to run the proxy. Set to 0 to pick a random port. -p, --port=8001: The port on which to run the proxy. Set to 0 to pick a random port.
--reject-methods="POST,PUT,PATCH": Regular expression for HTTP methods that the proxy should reject. --reject-methods="POST,PUT,PATCH": Regular expression for HTTP methods that the proxy should reject.
--reject-paths="^/api/.*/exec,^/api/.*/run": Regular expression for paths that the proxy should reject. --reject-paths="^/api/.*/exec,^/api/.*/run": Regular expression for paths that the proxy should reject.
...@@ -122,7 +121,7 @@ $ kubectl proxy --api-prefix=/k8s-api ...@@ -122,7 +121,7 @@ $ kubectl proxy --api-prefix=/k8s-api
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.166284754 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.472010935 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_proxy.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_proxy.md?pixel)]()
......
...@@ -73,7 +73,6 @@ kubectl replace --force -f ./pod.json ...@@ -73,7 +73,6 @@ kubectl replace --force -f ./pod.json
-f, --filename=[]: Filename, directory, or URL to file to use to replace the resource. -f, --filename=[]: Filename, directory, or URL to file to use to replace the resource.
--force[=false]: Delete and re-create the specified resource --force[=false]: Delete and re-create the specified resource
--grace-period=-1: Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative. --grace-period=-1: Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.
-h, --help[=false]: help for replace
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
--timeout=0: Only relevant during a force replace. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object --timeout=0: Only relevant during a force replace. The length of time to wait before giving up on a delete of the old resource, zero means determine a timeout from the size of the object
--validate[=true]: If true, use a schema to validate the input before sending it --validate[=true]: If true, use a schema to validate the input before sending it
...@@ -111,7 +110,7 @@ kubectl replace --force -f ./pod.json ...@@ -111,7 +110,7 @@ kubectl replace --force -f ./pod.json
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.164469074 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.469727962 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_replace.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_replace.md?pixel)]()
......
...@@ -72,7 +72,6 @@ $ kubectl rolling-update frontend --image=image:v2 ...@@ -72,7 +72,6 @@ $ kubectl rolling-update frontend --image=image:v2
--deployment-label-key="deployment": The key to use to differentiate between two different controllers, default 'deployment'. Only relevant when --image is specified, ignored otherwise --deployment-label-key="deployment": The key to use to differentiate between two different controllers, default 'deployment'. Only relevant when --image is specified, ignored otherwise
--dry-run[=false]: If true, print out the changes that would be made, but don't actually make them. --dry-run[=false]: If true, print out the changes that would be made, but don't actually make them.
-f, --filename=[]: Filename or URL to file to use to create the new replication controller. -f, --filename=[]: Filename or URL to file to use to create the new replication controller.
-h, --help[=false]: help for rolling-update
--image="": Image to use for upgrading the replication controller. Can not be used with --filename/-f --image="": Image to use for upgrading the replication controller. Can not be used with --filename/-f
--no-headers[=false]: When using the default output, don't print headers. --no-headers[=false]: When using the default output, don't print headers.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name. -o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
...@@ -119,7 +118,7 @@ $ kubectl rolling-update frontend --image=image:v2 ...@@ -119,7 +118,7 @@ $ kubectl rolling-update frontend --image=image:v2
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-26 09:03:39.974410445 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.470878033 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rolling-update.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_rolling-update.md?pixel)]()
......
...@@ -77,7 +77,6 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN> ...@@ -77,7 +77,6 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
--command[=false]: If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default. --command[=false]: If true and extra arguments are present, use them as the 'command' field in the container, rather than the 'args' field which is the default.
--dry-run[=false]: If true, only print the object that would be sent, without sending it. --dry-run[=false]: If true, only print the object that would be sent, without sending it.
--generator="": The name of the API generator to use. Default is 'run/v1' if --restart=Always, otherwise the default is 'run-pod/v1'. --generator="": The name of the API generator to use. Default is 'run/v1' if --restart=Always, otherwise the default is 'run-pod/v1'.
-h, --help[=false]: help for run
--hostport=-1: The host port mapping for the container port. To demonstrate a single-machine container. --hostport=-1: The host port mapping for the container port. To demonstrate a single-machine container.
--image="": The image for the container to run. --image="": The image for the container to run.
-l, --labels="": Labels to apply to the pod(s). -l, --labels="": Labels to apply to the pod(s).
...@@ -127,7 +126,7 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN> ...@@ -127,7 +126,7 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-02 09:55:50.948932668 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.472292491 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]()
......
...@@ -70,7 +70,6 @@ $ kubectl scale --replicas=5 rc/foo rc/bar ...@@ -70,7 +70,6 @@ $ kubectl scale --replicas=5 rc/foo rc/bar
``` ```
--current-replicas=-1: Precondition for current size. Requires that the current size of the replication controller match this value in order to scale. --current-replicas=-1: Precondition for current size. Requires that the current size of the replication controller match this value in order to scale.
-f, --filename=[]: Filename, directory, or URL to a file identifying the replication controller to set a new size -f, --filename=[]: Filename, directory, or URL to a file identifying the replication controller to set a new size
-h, --help[=false]: help for scale
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
--replicas=-1: The new desired number of replicas. Required. --replicas=-1: The new desired number of replicas. Required.
--resource-version="": Precondition for resource version. Requires that the current resource version match this value in order to scale. --resource-version="": Precondition for resource version. Requires that the current resource version match this value in order to scale.
...@@ -109,7 +108,7 @@ $ kubectl scale --replicas=5 rc/foo rc/bar ...@@ -109,7 +108,7 @@ $ kubectl scale --replicas=5 rc/foo rc/bar
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.165785015 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.471116954 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_scale.md?pixel)]()
......
...@@ -72,7 +72,6 @@ $ kubectl stop -f path/to/resources ...@@ -72,7 +72,6 @@ $ kubectl stop -f path/to/resources
--all[=false]: [-all] to select all the specified resources. --all[=false]: [-all] to select all the specified resources.
-f, --filename=[]: Filename, directory, or URL to file of resource(s) to be stopped. -f, --filename=[]: Filename, directory, or URL to file of resource(s) to be stopped.
--grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. --grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
-h, --help[=false]: help for stop
--ignore-not-found[=false]: Treat "resource not found" as a successful stop. --ignore-not-found[=false]: Treat "resource not found" as a successful stop.
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name). -o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
-l, --selector="": Selector (label query) to filter on. -l, --selector="": Selector (label query) to filter on.
...@@ -111,7 +110,7 @@ $ kubectl stop -f path/to/resources ...@@ -111,7 +110,7 @@ $ kubectl stop -f path/to/resources
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.166601667 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.47250815 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_stop.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_stop.md?pixel)]()
......
...@@ -48,7 +48,6 @@ kubectl version ...@@ -48,7 +48,6 @@ kubectl version
``` ```
-c, --client[=false]: Client version only (no server required). -c, --client[=false]: Client version only (no server required).
-h, --help[=false]: help for version
``` ```
### Options inherited from parent commands ### Options inherited from parent commands
...@@ -83,7 +82,7 @@ kubectl version ...@@ -83,7 +82,7 @@ kubectl version
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager * [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.1688832 +0000 UTC ###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476464324 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_version.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_version.md?pixel)]()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment