From 91597bc6c338fedfec7842cdf47479712402783c Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 30 Oct 2017 15:01:00 -0400 Subject: [PATCH] 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 --- cmd/ctr/task.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/cmd/ctr/task.go b/cmd/ctr/task.go index c103b7271..243394380 100644 --- a/cmd/ctr/task.go +++ b/cmd/ctr/task.go @@ -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")