Move task list to separate command

This keeps the semantics the same as the other commands to only list
containers, tasks, images by calling the list subcommand.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-10-30 15:01:00 -04:00
parent 58835d2edc
commit 91597bc6c3

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")