zsh-users
 help / color / mirror / code / Atom feed
* How is it guaranteed that zle is active during sched call?
@ 2016-09-10 22:28 Sebastian Gniazdowski
  2016-09-11 18:06 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Gniazdowski @ 2016-09-10 22:28 UTC (permalink / raw)
  To: Zsh Users

Hello,
I saw codes on the internet that advise doing "zle && zle
reset-prompt" when wanting a Zle change from a sched call, e.g. here (on
the bottom, last 11 item):

http://chneukirchen.org/blog/archive/2013/03/10-fresh-zsh-tricks-you-may-not-know.html

I once too occurred sched calls that indeed were zle == false, and
added such "zle &&" guard too. Now when I test I always get zle
active. When to expect lack of zle, can this be predicted? Will
re-scheduling (with +1 second) help?

Best regards,
Sebastian Gniazdowski


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

* Re: How is it guaranteed that zle is active during sched call?
  2016-09-10 22:28 How is it guaranteed that zle is active during sched call? Sebastian Gniazdowski
@ 2016-09-11 18:06 ` Peter Stephenson
  2016-09-11 20:08   ` Sebastian Gniazdowski
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2016-09-11 18:06 UTC (permalink / raw)
  To: Zsh Users

It's not guaranteed that zle will be active during a sched call.
Sched is generally handled as part of the pre-prompt functions; there is
no intended linkage between this and zle.  Any interaction is not
thought out (to my knowledge --- and sched is an old function that
hasn't been tinkered with for a long time, I think).

pws


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

* Re: How is it guaranteed that zle is active during sched call?
  2016-09-11 18:06 ` Peter Stephenson
@ 2016-09-11 20:08   ` Sebastian Gniazdowski
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Gniazdowski @ 2016-09-11 20:08 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users

On 11 September 2016 at 20:06, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
> It's not guaranteed that zle will be active during a sched call.
> Sched is generally handled as part of the pre-prompt functions; there is
> no intended linkage between this and zle.  Any interaction is not
> thought out (to my knowledge --- and sched is an old function that
> hasn't been tinkered with for a long time, I think).

That for a moment sounded scary as if sched wouldn't be considered
important. I just finished initial version of a Zconvey plugin. It
integrates multiple Zsh sessions and will serve as a base for other
plugin that will make all this semi-graphical. I use sched to pull a
flock-guarded text file, to see if there are commands to run. You said
Zle isn't thought to be working with Sched but the miraculous ioctl(
0, TIOCSTI, c ); saved me totally, everything works, I can update
command line from Sched:

https://asciinema.org/a/ayklrum7g4ut2hpt7mg6j0nzj

Maybe Sched could be revisited a little and pulled up to work with
Zle, .kill-buffer at least?

Best regards,
Sebastian Gniazdowski


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

end of thread, other threads:[~2016-09-11 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-10 22:28 How is it guaranteed that zle is active during sched call? Sebastian Gniazdowski
2016-09-11 18:06 ` Peter Stephenson
2016-09-11 20:08   ` Sebastian Gniazdowski

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).