zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: The `zle' command and traps
Date: Thu, 9 Mar 2000 13:21:19 +0100 (MET)	[thread overview]
Message-ID: <200003091221.NAA25853@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Sat, 4 Mar 2000 04:46:03 +0000


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


             reply	other threads:[~2000-03-09 12:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-09 12:21 Sven Wischnowsky [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200003091221.NAA25853@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).