From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23306 invoked by alias); 14 Sep 2016 01:47:00 -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: 21898 Received: (qmail 14601 invoked from network); 14 Sep 2016 01:47:00 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f177.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.192.177):SA:0(0.0/5.0):. Processed in 0.757796 secs); 14 Sep 2016 01:47:00 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=ZDQ2YxXHX0VIN4UVjWwrLIFHdcGPYx5TPbQ+j1tZAWw=; b=LR0JYFalpdkIfbZRvUSy4nyleA0LOxzq6rRxtjHrvebnA5F5Ih8jCjPXwAdn8g085M QPocUFZ/MjNySFhY1ywWhR8r9o55jZaHxQ86iH60Cas/IeMxMhL1AEdA9xJcVvyLnKDW zfr8WI/DV1YQsc98d0BT47lu0Aqsq/n2hWToccVNFdKiA3qbsobSeBQQvIfy2IP3XahK 83rUZoi8NIEv9aEwffOT2QFuS+j3P9RCYwoWRGI1oo9g9vCMuGG+OPmtB+vJKI1/el9U u/rIL0YzwVmy3dXj1VmPKHdSoxEFt0FGtBHeRGnAf6DTSTm+l5Eb/zMrK1i/UEnHjMoU LApQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=ZDQ2YxXHX0VIN4UVjWwrLIFHdcGPYx5TPbQ+j1tZAWw=; b=MngpIYtW6Cj3BRM9IDlKIZYF2tckZpn4MrG6SYZchQjcs3YgPLiaBMXAkP0BLevwP+ r+n2irD7d5LwVg/4v2A1XuHAE0idbLMxis6nUml7hGAo2k5eAtBeZ5VvWmJ8AykT8FiD tG7HzEPdk0lJjbzhrenk/u/1q7UqEUXfNm6yOjmtdGApE1jLSDWgYApySw4S+AfucxJJ PDiYlcNWoTJUfB0fhAUt4PqL0idMxZ1McYKj3oLyTFvg5C+hC89BEkd36Jwzqj2mqVXF FqPZmzx+vsfXXUpUKhrptfoKcByduhhNxg9wZ9PvEDf98BayN0d5iZhPeyLzgFyjXpw3 vo5Q== X-Gm-Message-State: AE9vXwMzBsxn7HPlf5nckWt+9Ka+fOYZ5JBF5KbFLYYabmLG3osGrJ4gSeuqqU5Dszgsfg== X-Received: by 10.98.35.207 with SMTP id q76mr54092pfj.42.1473817612560; Tue, 13 Sep 2016 18:46:52 -0700 (PDT) From: Bart Schaefer Message-Id: <160913184702.ZM30221@torch.brasslantern.com> Date: Tue, 13 Sep 2016 18:47:02 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call" (Sep 13, 7:29pm) References: <160911181347.ZM21403@torch.brasslantern.com> <160912080654.ZM24107@torch.brasslantern.com> <160912103408.ZM25185@torch.brasslantern.com> <160913095536.ZM29101@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 13, 7:29pm, Sebastian Gniazdowski wrote: } } 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 find this statement puzzling, because if you do an accept-line from inside the convey-handler, you're still potentially executing before anyone sees the commands. Making them visible during/after they've executed isn't especially helpful if they're doing something they shouldn't. However, you can certainly accomplish displaying what's being done without having to poke it into the editor buffer. Minimally, you can do (again using "sched -o") for histent in "$commands[@]"; do # sched -o will clean up zle for us, so fake a prompt ... print -Prn -- "$PS1" # ... show the command we're about to run ... print -r -- "$histent" # ... put it in the history ... print -Sr -- "$histent" # ... and then run it eval "$histent" done This has to vary a little depending on the format of $commands (the above presumes it's an array of one command per element) but you get the idea.