From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18339 invoked by alias); 13 Dec 2016 17:30:08 -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: 22215 Received: (qmail 24800 invoked from network); 13 Dec 2016 17:30:08 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk0-f45.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.213.45):SA:0(-0.0/5.0):. Processed in 14.605826 secs); 13 Dec 2016 17:30:08 -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=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,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: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.213.45 as permitted sender) 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=7W6r9GahqUCCqqWVB6oV8hsdrlVaKVzq44J8a9/ooSw=; b=Qt/Adyn92BeubLVmlBENi7NGTo+QXIC4AFcnKnw/z3WoCnhoPyshY7Krr1D3iJFNqo 2hRSX0COkgIALm4ew8acCRyeXZnwsuggW6KxRbjKXauUiDzs6FQq0kpUfW50Q8pavVLQ DXwLj+yej3laFW6EWOYFPuXB1PtmJ1pAK3K4C2Cb3oiH0QMvo6kjNnffDbEnVJojQkhV E4Pd+7/brD3he67dokg2PnwOlxC7wqwBcRmWy7OHv85IaGUlO5T1te9RBJK8sNpBAabj wKgm7F6mchLCAmHeV/tkKr/9H+TUp1xsizrrk4QYJNOd2aJnBzIhASC5/81XX+2P4pop La6w== 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=7W6r9GahqUCCqqWVB6oV8hsdrlVaKVzq44J8a9/ooSw=; b=elzDoCBzLjofxMYUww9h0Aw1OQSlLEEBITVvj+qd5Me+tpRgvP6uP6Gb0NfTX+lnzp CBm43WpfhRoUnHsQ+UO2F7hO7FLebKmksJH301PE8g3w/3o0nMquqE8bxPawGoH4Zej+ yqz0kQ4ts3OgKTTjuo4oAiZnKHbC1OnCIrENCGGDNyQzazd7vlxueW5E8Dtq5glYC2l4 508J88k1Zl3MtB915TbX8CbJP6iI5RR2K2GT3pLk3hR7fk964r0ULsL9SBkayaiHL73T k6MNXxA1Q8MplwFjnqiuRGjMfmjXf6NaOjchLUsylY7sXuDd5KW1T/AhloOnE91Pjn8t CyFQ== X-Gm-Message-State: AKaTC033VnpxaAv5rbunAbVDpVYD8LTdhKXzus/npFLJTwUzCJYMqKdO/uutgQPtO9E2Vw== X-Received: by 10.31.154.65 with SMTP id c62mr7279024vke.174.1481650182703; Tue, 13 Dec 2016 09:29:42 -0800 (PST) From: Bart Schaefer Message-Id: <161213093008.ZM22110@torch.brasslantern.com> Date: Tue, 13 Dec 2016 09:30:08 -0800 In-Reply-To: <20161213164749.5gfrgorfe2ad4edr@spiegl.de> Comments: In reply to Andy Spiegl "Re: Howto to print ENTER to zle-buffer?" (Dec 13, 5:47pm) References: <20161213150101.lgcl6r44gc5b4sia@spiegl.de> <161213081230.ZM21776@torch.brasslantern.com> <20161213164749.5gfrgorfe2ad4edr@spiegl.de> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Howto to print ENTER to zle-buffer? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 13, 5:47pm, Andy Spiegl wrote: } } > If for some reason you really need the command executed within ZLE, } Actually, yes. It's for sort of a session-management I'm trying to write. Usually better if you say stuff like this up front, it helps to have context when trying to answer a question! Given this -- and assuming you can target zsh-5.3 -- I'd go with: autoload -Uz add-zle-hook-widget session-startup { command-to-run args # your thing here add-zle-hook-widget -d line-init $WIDGET } add-zle-hook-widget line-init session-startup