From d628e9cf7c4507232cc59467516b0a0a633fe06c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 20 Jun 2019 11:50:15 +0200 Subject: [PATCH] script: default to new format when new features expected The old format should be the default for stdout only. Signed-off-by: Karel Zak --- term-utils/script.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/term-utils/script.c b/term-utils/script.c index 6569c98f49..7d684886d8 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -1063,8 +1063,11 @@ int main(int argc, char **argv) } if (timingfile) { + /* the old SCRIPT_FMT_TIMING_SIMPLE should be used when + * recoding output only (just for backward compatibility), + * otherwise switch to new format. */ if (!format) - format = outfile && infile ? + format = infile || (outfile && infile) ? SCRIPT_FMT_TIMING_MULTI : SCRIPT_FMT_TIMING_SIMPLE; -- 2.47.2