zsh-workers
 help / color / mirror / code / Atom feed
* Re: The `zle' command and traps
@ 2000-03-09 12:21 Sven Wischnowsky
  2000-03-11  7:57 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-03-09 12:21 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> Here's an odd tidbit ... `zle' from a trap handler can actually affect the
> line editor, if and only if the signal happens to arrive while ZLE is
> active.  E.g. try
> 
> 	TMOUT=2 ; TRAPALRM() { zle -R "Hi there, I'm a trap." }
> 
> Of course if the signal arrives when ZLE is not active, this generates an
> ugly warning message.

I was about to add a/some test(s) for sfcontext in bin_zle()
but... this is quite cool, isn't it? ;-)

We had some people asking if it was possible to display the current
time in the prompt and have that updated even without having new
prompts displayed. Something like the above almost allows that.

So, should we disallow it completely? Or make the zle builtin be quiet
if zle isn't active? Make the zle special parameters accessible
(read-only) in traps if zle is active? Add a way to detect if zle is
active? Add a way to detect if (the shell thinks that) there is a
completion list displayed below the prompt? Etc, etc?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread
* The `zle' command and traps
@ 2000-03-04  4:46 Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2000-03-04  4:46 UTC (permalink / raw)
  To: zsh-workers

Here's an odd tidbit ... `zle' from a trap handler can actually affect the
line editor, if and only if the signal happens to arrive while ZLE is
active.  E.g. try

	TMOUT=2 ; TRAPALRM() { zle -R "Hi there, I'm a trap." }

Of course if the signal arrives when ZLE is not active, this generates an
ugly warning message.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-03-14 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-09 12:21 The `zle' command and traps Sven Wischnowsky
2000-03-11  7:57 ` Bart Schaefer
2000-03-14 18:24   ` zle -U Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-03-04  4:46 The `zle' command and traps Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).