diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-28 14:25:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 14:25:43 -0400 |
commit | 2e9f792e378491acc3c04ba389ec7cf15bef471e (patch) | |
tree | c7c864d61471b2b3559132cb870b9efdfce3a9b3 /cmd/podman/machine | |
parent | b2725024f859193eef10d33837258b206aab8245 (diff) | |
parent | 6b7fd318bd541033ab36fb5c3b3d0bfe79fc4f8c (diff) | |
download | podman-2e9f792e378491acc3c04ba389ec7cf15bef471e.tar.gz podman-2e9f792e378491acc3c04ba389ec7cf15bef471e.tar.bz2 podman-2e9f792e378491acc3c04ba389ec7cf15bef471e.zip |
Merge pull request #14053 from Luap99/shell-format
shell completion --format: work with nil structs
Diffstat (limited to 'cmd/podman/machine')
-rw-r--r-- | cmd/podman/machine/inspect.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/list.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/machine/inspect.go b/cmd/podman/machine/inspect.go index 1884cf94d..147afe2b4 100644 --- a/cmd/podman/machine/inspect.go +++ b/cmd/podman/machine/inspect.go @@ -41,7 +41,7 @@ func init() { flags := inspectCmd.Flags() formatFlagName := "format" flags.StringVar(&inspectFlag.format, formatFlagName, "", "Format volume output using JSON or a Go template") - _ = inspectCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(machine.InspectInfo{})) + _ = inspectCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&machine.InspectInfo{})) } func inspect(cmd *cobra.Command, args []string) error { diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go index 587e521a3..c987bf71a 100644 --- a/cmd/podman/machine/list.go +++ b/cmd/podman/machine/list.go @@ -69,7 +69,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, common.AutocompleteFormat(machineReporter{})) + _ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&machineReporter{})) flags.BoolVar(&listFlag.noHeading, "noheading", false, "Do not print headers") flags.BoolVarP(&listFlag.quiet, "quiet", "q", false, "Show only machine names") } |