From 3cf3881fa46cb275a910f37331e13bdc9fd142a4 Mon Sep 17 00:00:00 2001 From: Danail Branekov Date: Mon, 2 Jul 2018 10:20:20 +0300 Subject: [PATCH] Introduce plugins/list subcommand `Ctr` interface follows the pattern `ctr ` except for the `plugins` command which does not have subcommands. This feels unnatural to certain users and they would expect that they can list containerd plugins via `ctr plugins list`. This commit implements their expectation so that `plugins` becomes a command "group" and its `list` subcommand actually lists the plugins. Signed-off-by: Danail Branekov --- cmd/ctr/commands/plugins/plugins.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/ctr/commands/plugins/plugins.go b/cmd/ctr/commands/plugins/plugins.go index 93f3ffe7b..df29441c4 100644 --- a/cmd/ctr/commands/plugins/plugins.go +++ b/cmd/ctr/commands/plugins/plugins.go @@ -37,6 +37,15 @@ var Command = cli.Command{ Name: "plugins", Aliases: []string{"plugin"}, Usage: "provides information about containerd plugins", + Subcommands: []cli.Command{ + listCommand, + }, +} + +var listCommand = cli.Command{ + Name: "list", + Aliases: []string{"ls"}, + Usage: "lists containerd plugins", Flags: []cli.Flag{ cli.BoolFlag{ Name: "quiet,q",