From 35c50faae2787e13649146bad216e1f6444f13b8 Mon Sep 17 00:00:00 2001 From: Jeremy Smart Date: Thu, 28 Mar 2024 21:48:00 -0400 Subject: [PATCH] add --always-reprint flag --- zscroll | 9 ++++++++- zscroll.1 | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/zscroll b/zscroll index a9bddb4..eb5fb6d 100755 --- a/zscroll +++ b/zscroll @@ -38,6 +38,13 @@ parser.add_argument( """, ) +parser.add_argument( + '--always-reprint', + type=str_to_bool, + default=False, + help="reprint text every delay even if it hasn't changed" +) + parser.add_argument( '-l', '--length', @@ -425,7 +432,7 @@ def zscroll(lines=0): needs_scrolling, (last_hidden_was_wide or next_hidden_is_wide), ) - if args.scroll and needs_scrolling or should_restart_printing: + if args.always_reprint or (args.scroll and needs_scrolling) or should_restart_printing: print_text(display_text) should_restart_printing = False if args.scroll and needs_scrolling: diff --git a/zscroll.1 b/zscroll.1 index 63b235e..3825310 100644 --- a/zscroll.1 +++ b/zscroll.1 @@ -55,6 +55,8 @@ Add a newline after every update/step (may be necessary for use with panels). Ta .TP \fB\-t TIME\fR, \fB \-\-timeout=TIME\fR Time in seconds to run before closing. An argument of zero implies infinite duration. (default: 0) +\fB \-\-always\-reprint=BOOL\fR +Whether to reprint unchanged text after the specified delay (default: false) .SH EXAMPLES These examples are meant for testing in the terminal (remove the "-n false" for use with panels).