Zsh Mailing List Archive
Messages sorted by:
Re: get the number of active jobs to show in the prompt?
- X-seq: zsh-users 4326
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: get the number of active jobs to show in the prompt?
- Date: Wed, 3 Oct 2001 17:35:00 +0200
- In-reply-to: <1011003151104.ZM26311@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20011002181324.A29201@xxxxxxxxxxxxxx> <200110022325.JAA07306@xxxxxxxxxxxxxxxxxxxxxxxx> <4ac3633923vincent@xxxxxxxxxx> <1011003054350.ZM25561@xxxxxxxxxxxxxxxxxxxxxxx> <20011003162246.C32766@xxxxxxxxxxxxxx> <1011003151104.ZM26311@xxxxxxxxxxxxxxxxxxxxxxx>
On Wed, Oct 03, 2001 at 15:11:04 +0000, Bart Schaefer wrote:
> There are two issues: One, I think it's a bad idea in the first place
> because its potentially very disruptive to the interactive experience.
> Imagine how you'd feel using, say, "vi" if it were to exit in the middle
> of you typing a sentence and then start up again with the text you were
> editing possibly shifted to another part of the screen.
But this is not caused by calling a function when the prompt is
redisplayed. This is caused by the NOTIFY option. And any user
can disable it. In my case, a job shouldn't terminate when I'm
typing something in zle, or something bad happened.
Perhaps I could disable NOTIFY when zle is active and use TRAPCLD with
zle -M in this case. Is it possible? For instance with a setopt nonotify
in precmd and a setopt notify in preexec?
> It's another matter if this happens on an explicit user action -- you
> could create your own widget that would redraw the prompt, and bind it
> to ctrl-L or something.
How can I do that (to rebuild the prompt when clear-screen is called)?
> Two, even if I didn't think the resulting interactive experience would
> be nasty, I don't think the expected benefit is worth the implementation
> effort. There's much more state to save/restore than just the contents
> of the editor buffers, and in the case of a user-defined widget it may
> not even be possible to know what state needs to be saved and restored.
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by: