aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-28 14:25:43 -0400
committerGitHub <noreply@github.com>2022-04-28 14:25:43 -0400
commit2e9f792e378491acc3c04ba389ec7cf15bef471e (patch)
treec7c864d61471b2b3559132cb870b9efdfce3a9b3 /cmd/podman/system
parentb2725024f859193eef10d33837258b206aab8245 (diff)
parent6b7fd318bd541033ab36fb5c3b3d0bfe79fc4f8c (diff)
downloadpodman-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/system')
-rw-r--r--cmd/podman/system/connection/list.go2
-rw-r--r--cmd/podman/system/events.go2
-rw-r--r--cmd/podman/system/info.go2
-rw-r--r--cmd/podman/system/version.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system/connection/list.go b/cmd/podman/system/connection/list.go
index fe37677df..2c5f6a310 100644
--- a/cmd/podman/system/connection/list.go
+++ b/cmd/podman/system/connection/list.go
@@ -38,7 +38,7 @@ func init() {
})
listCmd.Flags().String("format", "", "Custom Go template for printing connections")
- _ = listCmd.RegisterFlagCompletionFunc("format", common.AutocompleteFormat(namedDestination{}))
+ _ = listCmd.RegisterFlagCompletionFunc("format", common.AutocompleteFormat(&namedDestination{}))
}
type namedDestination struct {
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index 2723adc43..09e589d3c 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -51,7 +51,7 @@ func init() {
formatFlagName := "format"
flags.StringVar(&eventFormat, formatFlagName, "", "format the output using a Go template")
- _ = eventsCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(events.Event{}))
+ _ = eventsCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&events.Event{}))
flags.BoolVar(&eventOptions.Stream, "stream", true, "stream new events; for testing only")
diff --git a/cmd/podman/system/info.go b/cmd/podman/system/info.go
index e95e9336d..f8fd946cd 100644
--- a/cmd/podman/system/info.go
+++ b/cmd/podman/system/info.go
@@ -66,7 +66,7 @@ func infoFlags(cmd *cobra.Command) {
formatFlagName := "format"
flags.StringVarP(&inFormat, formatFlagName, "f", "", "Change the output format to JSON or a Go template")
- _ = cmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(define.Info{Host: &define.HostInfo{}, Store: &define.StoreInfo{}}))
+ _ = cmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&define.Info{}))
}
func info(cmd *cobra.Command, args []string) error {
diff --git a/cmd/podman/system/version.go b/cmd/podman/system/version.go
index 9fb4a966a..7202b2c08 100644
--- a/cmd/podman/system/version.go
+++ b/cmd/podman/system/version.go
@@ -34,7 +34,7 @@ func init() {
formatFlagName := "format"
flags.StringVarP(&versionFormat, formatFlagName, "f", "", "Change the output format to JSON or a Go template")
- _ = versionCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(entities.SystemVersionReport{}))
+ _ = versionCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&entities.SystemVersionReport{}))
}
func version(cmd *cobra.Command, args []string) error {