Add --shell argument

Add subshell argument --shell. Currently, support only bash, which is
also the default value.
pull/66/head
Andy Zhou 5 years ago
parent d63f7d4bf2
commit abd9a984eb
  1. 4
      cli/commands.go
  2. 5
      main.go

@ -355,5 +355,9 @@ func GetKubeConfig(c *cli.Context) error {
}
func Shell(c *cli.Context) error {
if c.String("shell") != "bash" {
return fmt.Errorf("%s is not supported. Only bash is supported", c.String("shell"))
}
return bashShell(c.String("name"), c.String("command"))
}

@ -59,6 +59,11 @@ func main() {
Name: "command, c",
Usage: "Run a shell command in the context of the cluster",
},
cli.StringFlag{
Name: "shell, s",
Value: "bash",
Usage: "Sub shell type. Only bash is supported. (default bash)",
},
},
Action: run.Shell,
},

Loading…
Cancel
Save