2022-04-29 19:53:34 +00:00
|
|
|
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{
|
2023-01-31 20:57:48 +00:00
|
|
|
&cli.BoolFlag{
|
2022-04-29 19:53:34 +00:00
|
|
|
Name: "i",
|
|
|
|
Usage: "Install source line to rc file",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|