summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders F Björklund <anders.f.bjorklund@gmail.com>2021-09-23 20:31:41 +0200
committerAshley Cui <acui@redhat.com>2021-12-15 09:18:38 -0500
commitd00ae6a947263e0d1d91b265e5c01c290c009831 (patch)
tree46ffd057d5d40e91cc42e771b85c7672b842769e
parent8f7d17dc48471f40ecabe082b015c080f7bf07d2 (diff)
downloadpodman-d00ae6a947263e0d1d91b265e5c01c290c009831.tar.gz
podman-d00ae6a947263e0d1d91b265e5c01c290c009831.tar.bz2
podman-d00ae6a947263e0d1d91b265e5c01c290c009831.zip
Add completion for machine list format
[NO NEW TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
-rw-r--r--cmd/podman/machine/list.go3
1 files changed, 2 insertions, 1 deletions
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")
}