podman events: unhide --stream

The --stream flag is being used extensively in the tests and some blog
posts refer to it which has been causing some confusion on why the flag
was hidden.  I do not see a good reason to hide it anymore, so unhide it
and add some docs.

[NO NEW TESTS NEEDED] as it's already being tested.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg 2023-03-14 11:26:50 +01:00
parent 519cfa81f6
commit 4562e61d20
2 changed files with 4 additions and 3 deletions

View File

@ -72,7 +72,7 @@ func eventsFlags(cmd *cobra.Command) {
flags.StringVar(&eventFormat, formatFlagName, "", "format the output using a Go template")
_ = cmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteFormat(&events.Event{}))
flags.BoolVar(&eventOptions.Stream, "stream", true, "stream new events; for testing only")
flags.BoolVar(&eventOptions.Stream, "stream", true, "stream events and do not exit when returning the last known event")
sinceFlagName := "since"
flags.StringVar(&eventOptions.Since, sinceFlagName, "", "show all events created since timestamp")
@ -83,8 +83,6 @@ func eventsFlags(cmd *cobra.Command) {
untilFlagName := "until"
flags.StringVar(&eventOptions.Until, untilFlagName, "", "show all events until timestamp")
_ = cmd.RegisterFlagCompletionFunc(untilFlagName, completion.AutocompleteNone)
_ = flags.MarkHidden("stream")
}
func eventsCmd(cmd *cobra.Command, _ []string) error {

View File

@ -128,6 +128,9 @@ Do not truncate the output (default *true*).
Show all events created since the given timestamp
#### **--stream**
Stream events and do not exit after reading the last known event (default *true*).
#### **--until**=*timestamp*