diff options
author | Eric Wong <e@80x24.org> | 2021-02-07 23:05:12 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-08 22:07:43 +0000 |
commit | fb6aa4da304125a3fb7932e1335be85ff260e031 (patch) | |
tree | 63e230503bdfc4c11a0888e80f5eae48194dc3f0 /lib/PublicInbox/LeiOverview.pm | |
parent | 80ba871c557eb5ba79c73150519ce9ea5225d695 (diff) | |
download | public-inbox-fb6aa4da304125a3fb7932e1335be85ff260e031.tar.gz |
For --mua users writing to lock-free -o MFOLDER destinations; we'll keep -WINCH and send an ASCII terminal bell when results are complete. This is intended to let early MUA spawners know when lei2mail is done writing results. We'll also support running arbitrary commands. It may be used to run play(1) (from SoX), handle pipelines+redirects (e.g. "/bin/sh -c 'echo search done | wall'") or other commands.
Diffstat (limited to 'lib/PublicInbox/LeiOverview.pm')
-rw-r--r-- | lib/PublicInbox/LeiOverview.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index f0ac4684..98c89d12 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -98,7 +98,10 @@ sub new { $opt->{'sort'} //= 'docid' if $dst ne '/dev/stdout'; $lei->{l2m} = eval { PublicInbox::LeiToMail->new($lei) }; return $lei->fail($@) if $@; - $lei->{early_mua} = 1 if $opt->{mua} && $lei->{l2m}->lock_free; + if ($opt->{mua} && $lei->{l2m}->lock_free) { + $lei->{early_mua} = 1; + $opt->{alert} //= [ '-WINCH,-bell' ] if -t $lei->{1}; + } } $self; } |