diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-09-17 07:02:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 07:02:52 -0400 |
commit | 9a5987cf6a7729f9d03a663dd361a37ca473da59 (patch) | |
tree | 447677216c3a88bef777cd6a452252a0314f17a7 /cmd/podman/system | |
parent | c6ae5c7961e2663ba91de7877aafe9791a80b245 (diff) | |
parent | 4216f7b7f492fee80cfc9a7f1deb608096edd890 (diff) | |
download | podman-9a5987cf6a7729f9d03a663dd361a37ca473da59.tar.gz podman-9a5987cf6a7729f9d03a663dd361a37ca473da59.tar.bz2 podman-9a5987cf6a7729f9d03a663dd361a37ca473da59.zip |
Merge pull request #11603 from rhatdan/truncate
Add no-trunc support to podman-events
Diffstat (limited to 'cmd/podman/system')
-rw-r--r-- | cmd/podman/system/events.go | 5 |
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)) } } |