Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [ramk@xxxxxxxxxxxxxxxxx: Bug#335481: zsh: zsh/sched waits for next return to prompt even with NOTIFY set]
- X-seq: zsh-workers 21934
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxxxxx>
- Subject: Re: [ramk@xxxxxxxxxxxxxxxxx: Bug#335481: zsh: zsh/sched waits for next return to prompt even with NOTIFY set]
- Date: Tue, 25 Oct 2005 23:17:28 +0100
- In-reply-to: <20051024193137.GA10982@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20051024193137.GA10982@xxxxxxxxxxx>
On Mon, 24 Oct 2005 15:31:37 -0400
Clint Adams <schizo@xxxxxxxxxx> wrote:
> The sched builting provided by the zsh/sched module seems to execute
> a scheduled command only when an enter is pressed after the time
> specified has elapsed/arrived, much like how mail notification
> occurs. This makes the command useless when the user wants to
> schedule and leave the shell idle, and start using it only after the
> time for which the command is scheduled. I don't know if this is a
> bug or it is the intended behaviour. If it is intended, I could
> suggest a few alternatives that would add this feature.
It's the intended behaviour, not so much because it's useful that way as
because it's the only thing that can be done without an additional
process (or thread, but the shell isn't multithreaded in the usual sense).
> 1. Execute as soon as the time arrives (maybe in the background),
> much like how job exit notification works with the NOTIFY option
> works. May be sched can reuse this option or have an option of
> its own. Or even better, perhaps one can indicate the desired
> behaviour on a per-item basis, by a flag, when adding an item.
This would require some use of SIGALRM. This can be done with a shell
function, for example. The display features that the notify option uses
are available with the zle command. That would be a worthwhile addition
to the distribution and probably more flexible than a builtin.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> Web page still at
http://www.pwstephenson.fsnet.co.uk/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author