aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/machine
diff options
context:
space:
mode:
authorAnders F Björklund <anders.f.bjorklund@gmail.com>2021-09-23 20:31:41 +0200
committerAnders F Björklund <anders.f.bjorklund@gmail.com>2021-09-23 20:31:57 +0200
commitba46613a6cfb43735d313280c191f2ed67c4ed23 (patch)
treeeb75489f6f2f66f4f170709eee91c9b9fef63f29 /cmd/podman/machine
parent4ecaf85d9656e3ba66421e26024f3e9910b75e92 (diff)
downloadpodman-ba46613a6cfb43735d313280c191f2ed67c4ed23.tar.gz
podman-ba46613a6cfb43735d313280c191f2ed67c4ed23.tar.bz2
podman-ba46613a6cfb43735d313280c191f2ed67c4ed23.zip
Add completion for machine list format
[NO TESTS NEEDED] Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Diffstat (limited to 'cmd/podman/machine')
-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")
}