summaryrefslogtreecommitdiff
path: root/cmd/podman/system
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-16 05:41:09 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-09-16 09:41:29 -0400
commit4216f7b7f492fee80cfc9a7f1deb608096edd890 (patch)
tree56ede81779ebfd2d02b2eea581a204706991db1b /cmd/podman/system
parent9119a578e782b92bd344f093f5491c318bc20d69 (diff)
downloadpodman-4216f7b7f492fee80cfc9a7f1deb608096edd890.tar.gz
podman-4216f7b7f492fee80cfc9a7f1deb608096edd890.tar.bz2
podman-4216f7b7f492fee80cfc9a7f1deb608096edd890.zip
Add no-trunc support to podman-events
Standardize on no-trunc through the code. Alias notruncate where necessary. Standardize on the man page display of no-trunc. Fixes: https://github.com/containers/podman/issues/8941 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/system')
-rw-r--r--cmd/podman/system/events.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index 677504cfc..e698e6652 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -36,6 +36,7 @@ var (
var (
eventOptions entities.EventsOptions
eventFormat string
+ noTrunc bool
)
func init() {
@@ -58,6 +59,8 @@ func init() {
flags.StringVar(&eventOptions.Since, sinceFlagName, "", "show all events created since timestamp")
_ = eventsCommand.RegisterFlagCompletionFunc(sinceFlagName, completion.AutocompleteNone)
+ flags.BoolVar(&noTrunc, "no-trunc", true, "do not truncate the output")
+
untilFlagName := "until"
flags.StringVar(&eventOptions.Until, untilFlagName, "", "show all events until timestamp")
_ = eventsCommand.RegisterFlagCompletionFunc(untilFlagName, completion.AutocompleteNone)
@@ -110,7 +113,7 @@ func eventsCmd(cmd *cobra.Command, _ []string) error {
}
fmt.Println("")
default:
- fmt.Println(event.ToHumanReadable())
+ fmt.Println(event.ToHumanReadable(!noTrunc))
}
}