From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28852 invoked by alias); 13 Sep 2016 17:30:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21895 Received: (qmail 13074 invoked from network); 13 Sep 2016 17:30:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.172):SA:0(0.0/5.0):. Processed in 0.370104 secs); 13 Sep 2016 17:30:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.220.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rfSt64Whi4SlLG5SZE1tqbVH0NNQYxzBoKFrmbQWieo=; b=Jn9viGMbrJxyvZo1HdtodeYoGq5hytSVEJh9XQI+n0vBfa5g7OJNAM2K8md9nECEA9 lIEMjR32d3wGidpYaPKBITJlSrdDiPwsoaUvVf6R2pw6AGxRidQgf/W/Adcinc/G/Oah TFBIO5l0WpXjemffEedBCJdr4uDP93huyUqN9zzG4Kh1rs2WnSwPnE0kDcP9pUuJz4fv qwNpcuXOfuiQ2PxEs3ghgDvsk8f2zgZPnpx/PWtEf/OIxgem/1d+lotQkUnfye8L7+1g x2mHRIWIRUu1Ga0v3pANv3Ba6focJ2NbS5F9d/lk4phsuLypze8IJ4MprdsuycUgLJ8e asag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rfSt64Whi4SlLG5SZE1tqbVH0NNQYxzBoKFrmbQWieo=; b=hXzXv7EUGrecDGY9rJcQw3UxLZY6DS/Fr/1GKBqwQ3kZ2njmEQwBJIRRNanNlBI8+R FIxdaNjIvth0N2YfVbyKJid/RhiKm38M/7mH2ZyhBZkxaagTos4Os+HWt/gZG6VeMEDD 7rbMok+o9kl03QAogmDpzsh+P8e+um5HORzZV97TZU1a79SExno9f6VeCPVgNxK4J87W wv4oLCXQVbwYDVzutDoOTDqIDn0GBSN9iGdu3NCL5VJKEK6z4UgJTjli4NKdy3JvIxZA LqEULSK340BRg+vtz53jmDwI8wtsOPtYDY86FyppWSKCcI8IQjoEDyUvQDnMtvEcgAir cbRQ== X-Gm-Message-State: AE9vXwMdVaLvQBvfFx1QCGfWBVumrTd3wLHA5up2yIrlC2bT4ivfaPXynpJsKYVZjY7E+v9JaUdGM1NP6/MGuw== X-Received: by 10.55.108.194 with SMTP id h185mr2368283qkc.37.1473787812786; Tue, 13 Sep 2016 10:30:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <160913095536.ZM29101@torch.brasslantern.com> References: <160911181347.ZM21403@torch.brasslantern.com> <160912080654.ZM24107@torch.brasslantern.com> <160912103408.ZM25185@torch.brasslantern.com> <160913095536.ZM29101@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Tue, 13 Sep 2016 19:29:52 +0200 Message-ID: Subject: Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 13 September 2016 at 18:55, Bart Schaefer 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