automation-tests/cmd/podman/system
Paul Holzinger d81021ed26 Add go template shell completion for --format
The --format flags accepts go template strings. I use this often but I
consistently forget the field names. This commit adds a way to provide
shell completion for the --format flag. It works by automatically
receiving the field names with the reflect package from the given
struct. This requires almost no maintenance since this ensures that we
always use the correct field names. This also works for nested structs.

```
$ podman ps --format "{{.P"
{{.Pid}}      {{.PIDNS}}    {{.Pod}}      {{.PodName}}  {{.Ports}}
```

NOTE: This only works when you use quotes otherwise the shell does not
provide completions. Also this does not work for fish at the moment.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-22 00:31:08 +02:00
..
connection bump go module to v3 2021-02-22 09:03:51 +01:00
connection.go bump go module to v3 2021-02-22 09:03:51 +01:00
df.go bump go module to v3 2021-02-22 09:03:51 +01:00
events.go Add go template shell completion for --format 2021-04-22 00:31:08 +02:00
info.go Add go template shell completion for --format 2021-04-22 00:31:08 +02:00
migrate.go bump go module to v3 2021-02-22 09:03:51 +01:00
prune.go Fix system prune cmd user message with options 2021-03-21 18:03:31 +01:00
renumber.go bump go module to v3 2021-02-22 09:03:51 +01:00
reset.go bump go module to v3 2021-02-22 09:03:51 +01:00
service.go bump go module to v3 2021-02-22 09:03:51 +01:00
service_abi.go podman-remote should show podman.sock info 2021-04-20 15:56:45 -04:00
system.go bump go module to v3 2021-02-22 09:03:51 +01:00
unshare.go podman unshare: add --rootless-cni to join the ns 2021-04-07 15:54:12 +02:00
version.go Add go template shell completion for --format 2021-04-22 00:31:08 +02:00