Index | Thread | Search

From:
Job Snijders <job@sobornost.net>
Subject:
Re: responsive watch wip
To:
Ted Unangst <tedu@tedunangst.com>
Cc:
tech@openbsd.org
Date:
Tue, 10 Jun 2025 19:52:01 +0000

Download raw body.

Thread
On Tue, Jun 10, 2025 at 03:44:34PM -0400, Ted Unangst wrote:
> On 2025-06-10, Job Snijders wrote:
> 
> > The correct behaviour is that watch displays the date(1) output every
> > 5 seconds. The interval is intended to be "the pause between runs",
> > not "execute command every X seconds, duplicates are fine". I hope
> > this clarifies.
> 
> okay, I think this is closer to that. And removes old read_result.

nice!

> It still starts a new process when you press space. Maybe it shouldn't,
> but maybe it should?

(Space) should launch a single instance of command (if command isn't already
running). Can be used while things are paused, or when the command finished
and the operator is waiting for the next invocation (for example when -s is
a high value and the command's execution time only takes a short while).

The "Pause" functionality seems broken with the below patch. Pressing 'p' after
a few seconds of watch 'date; sleep 3; date' results in a flurry of output
another few seconds later.

Kind regards,

Job