Merge pull request #1698 from crosbymichael/task-ls

Move task list to separate command
This commit is contained in:
Phil Estes 2017-10-30 21:30:02 -04:00 committed by GitHub
commit 9f5b97c510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,12 +14,6 @@ var tasksCommand = cli.Command{
Name: "tasks",
Usage: "manage tasks",
Aliases: []string{"t"},
Flags: []cli.Flag{
cli.BoolFlag{
Name: "quiet, q",
Usage: "print only the task id & pid",
},
},
Subcommands: []cli.Command{
taskAttachCommand,
taskCheckpointCommand,
@ -30,6 +24,19 @@ var tasksCommand = cli.Command{
taskResumeCommand,
taskStartCommand,
taskDeleteCommand,
taskListCommand,
},
}
var taskListCommand = cli.Command{
Name: "list",
Usage: "list tasks",
Aliases: []string{"ls"},
Flags: []cli.Flag{
cli.BoolFlag{
Name: "quiet, q",
Usage: "print only the task id & pid",
},
},
Action: func(context *cli.Context) error {
quiet := context.Bool("quiet")