From ba46613a6cfb43735d313280c191f2ed67c4ed23 Mon Sep 17 00:00:00 2001 From: Anders F Björklund Date: Thu, 23 Sep 2021 20:31:41 +0200 Subject: Add completion for machine list format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [NO TESTS NEEDED] Signed-off-by: Anders F Björklund --- cmd/podman/machine/list.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go index 5c8c6800c..95b7d860f 100644 --- a/cmd/podman/machine/list.go +++ b/cmd/podman/machine/list.go @@ -12,6 +12,7 @@ import ( "github.com/containers/common/pkg/completion" "github.com/containers/common/pkg/config" "github.com/containers/common/pkg/report" + "github.com/containers/podman/v3/cmd/podman/common" "github.com/containers/podman/v3/cmd/podman/registry" "github.com/containers/podman/v3/cmd/podman/validate" "github.com/containers/podman/v3/pkg/machine" @@ -62,7 +63,7 @@ func init() { flags := lsCmd.Flags() formatFlagName := "format" flags.StringVar(&listFlag.format, formatFlagName, "{{.Name}}\t{{.VMType}}\t{{.Created}}\t{{.LastUp}}\t{{.CPUs}}\t{{.Memory}}\t{{.DiskSize}}\n", "Format volume output using JSON or a Go template") - _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, completion.AutocompleteNone) + _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(machineReporter{})) flags.BoolVar(&listFlag.noHeading, "noheading", false, "Do not print headers") } -- cgit v1.2.3-54-g00ecf