From f8fe5605dde183595f1caf01b82d61e5cdd5dea8 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Mon, 5 Jun 2017 13:41:04 -0700 Subject: [PATCH] cmd/dist: better organization and aliases for image command Signed-off-by: Stephen J Day --- cmd/dist/images.go | 21 ++++++++++++++++----- cmd/dist/main.go | 9 --------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/cmd/dist/images.go b/cmd/dist/images.go index 1cbf5a8ce..53fbb3dce 100644 --- a/cmd/dist/images.go +++ b/cmd/dist/images.go @@ -12,9 +12,19 @@ import ( "github.com/urfave/cli" ) +var imageCommand = cli.Command{ + Name: "images", + Aliases: []string{"images"}, + Usage: "image management", + Subcommands: cli.Commands{ + imagesListCommand, + imageRemoveCommand, + }, +} + var imagesListCommand = cli.Command{ Name: "list", - Aliases: []string{"images"}, + Aliases: []string{"ls"}, Usage: "list images known to containerd", ArgsUsage: "[flags] ", Description: `List images registered with containerd.`, @@ -54,11 +64,12 @@ var imagesListCommand = cli.Command{ }, } -var rmiCommand = cli.Command{ - Name: "rmi", - Usage: "Delete one or more images by reference.", +var imageRemoveCommand = cli.Command{ + Name: "remove", + Aliases: []string{"rm"}, + Usage: "Remove one or more images by reference.", ArgsUsage: "[flags] [, ...]", - Description: `Delete one or more images by reference.`, + Description: `Remove one or more images by reference.`, Flags: []cli.Flag{}, Action: func(clicontext *cli.Context) error { var ( diff --git a/cmd/dist/main.go b/cmd/dist/main.go index adae9ebdf..db5b2e767 100644 --- a/cmd/dist/main.go +++ b/cmd/dist/main.go @@ -93,15 +93,6 @@ distribution tool } } -var imageCommand = cli.Command{ - Name: "image", - Usage: "image management", - Subcommands: cli.Commands{ - imagesListCommand, - rmiCommand, - }, -} - var contentCommand = cli.Command{ Name: "content", Usage: "content management",