aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-28 14:56:56 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-05-03 13:41:34 -0400
commit835b89c6041261c6181e5c73b6aa80d7c89eb2ac (patch)
treee1969210aedc73bb71f14d3940a281c9c2fcfa6f /cmd
parent68f7349bcd38c9633ebf3f21975046f14e75c803 (diff)
downloadpodman-835b89c6041261c6181e5c73b6aa80d7c89eb2ac.tar.gz
podman-835b89c6041261c6181e5c73b6aa80d7c89eb2ac.tar.bz2
podman-835b89c6041261c6181e5c73b6aa80d7c89eb2ac.zip
network inspect --format: add completion for go template
Make sure to autocomplete the go template for network inspect. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/networks/inspect.go3
1 files changed, 2 insertions, 1 deletions
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 {