mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
21 lines
428 B
Go
21 lines
428 B
Go
|
package cmds
|
||
|
|
||
|
import (
|
||
|
"github.com/urfave/cli"
|
||
|
)
|
||
|
|
||
|
func NewCompletionCommand(action func(*cli.Context) error) cli.Command {
|
||
|
return cli.Command{
|
||
|
Name: "completion",
|
||
|
Usage: "Install shell completion script",
|
||
|
UsageText: appName + " completion [SHELL] (valid shells: bash, zsh)",
|
||
|
Action: action,
|
||
|
Flags: []cli.Flag{
|
||
|
cli.BoolFlag{
|
||
|
Name: "i",
|
||
|
Usage: "Install source line to rc file",
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|