From 835b89c6041261c6181e5c73b6aa80d7c89eb2ac Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 28 Apr 2022 14:56:56 +0200 Subject: network inspect --format: add completion for go template Make sure to autocomplete the go template for network inspect. Signed-off-by: Paul Holzinger --- cmd/podman/networks/inspect.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/podman/networks/inspect.go b/cmd/podman/networks/inspect.go index 3c07e5492..8f39ec395 100644 --- a/cmd/podman/networks/inspect.go +++ b/cmd/podman/networks/inspect.go @@ -1,6 +1,7 @@ package network import ( + "github.com/containers/common/libnetwork/types" "github.com/containers/podman/v4/cmd/podman/common" "github.com/containers/podman/v4/cmd/podman/inspect" "github.com/containers/podman/v4/cmd/podman/registry" @@ -32,7 +33,7 @@ func init() { formatFlagName := "format" flags.StringVarP(&inspectOpts.Format, formatFlagName, "f", "", "Pretty-print network to JSON or using a Go template") - _ = networkinspectCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(nil)) + _ = networkinspectCommand.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&types.Network{})) } func networkInspect(_ *cobra.Command, args []string) error { -- cgit v1.2.3-54-g00ecf