zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call
Date: Tue, 13 Sep 2016 19:29:52 +0200	[thread overview]
Message-ID: <CAKc7PVC8e4MaA1BN5GY_Lfx746LwXmNZ60kxwP5A0RmXDjEVJA@mail.gmail.com> (raw)
In-Reply-To: <160913095536.ZM29101@torch.brasslantern.com>

On 13 September 2016 at 18:55, Bart Schaefer <schaefer@brasslantern.com> wrote:
> If I understand your desired end state correctly, I'd implement it
> more like the following:
>
> __convey_from_somwhere() {
>     # Reschedule ourself ...
>     sched -o +2 __convey_from_somwhere
>     # Setup ...
>     local commands
>     __get_commands_from_somewhere
>
>     # Ok, now we have the commands to run.  We want them recorded
>     # in the history as if they were user input, so first do that.
>     print -S "$commands"
>
>     # Now just run them.  This assumes we're running from "sched -o"
>     # (see above) which will handle saving/restoring ZLE state for
>     # us in case any of these commands interact with the terminal.
>     eval "${(j.;.)commands"
> }

Nice trick with print -S, thanks. I had in mind the
execute-without-simulating-input and plan to include it as option. Am
quite afraid to run things without people's eyes. I think that this
will be good when user starts to trust Zconvey, and firstly I should
trust it, after it is ran for few months at users' boxes.

Best regards,
Sebastian Gniazdowski


  reply	other threads:[~2016-09-13 17:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-11  9:28 Sebastian Gniazdowski
2016-09-11 10:35 ` Sebastian Gniazdowski
2016-09-12  1:13   ` Bart Schaefer
2016-09-12 15:06     ` Bart Schaefer
2016-09-12 15:24       ` Sebastian Gniazdowski
2016-09-12 17:34         ` Bart Schaefer
2016-09-13 15:44           ` Sebastian Gniazdowski
2016-09-13 16:55             ` Bart Schaefer
2016-09-13 17:29               ` Sebastian Gniazdowski [this message]
2016-09-14  1:47                 ` Bart Schaefer
2016-09-14  5:13                   ` Sebastian Gniazdowski
2016-09-12  0:58 ` Bart Schaefer
2016-09-12  8:49   ` Peter Stephenson

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=CAKc7PVC8e4MaA1BN5GY_Lfx746LwXmNZ60kxwP5A0RmXDjEVJA@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).