From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3224 invoked by alias); 13 Jun 2014 21:34:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32776 Received: (qmail 25045 invoked from network); 13 Jun 2014 21:34:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:mime-version:subject:in-reply-to:date:cc :message-id:references:to; bh=0jMxfvqbp1nWAyeVbTVFnGFSjgewOJQRGgtluhIg6ck=; b=NJ7DcbpyQjpcdTvxPobn4L7OK4/2zBvbR7iExs22Z+Cp7vhLGFzKAn5gL1g4YJdN/D ySR4sTgX6Hh6FfgWUX4UI+XJxiXJ+PtUDIdlo09DikqpPi3ZV41lypmdhgd/qxTWWetX 2Hs/xS08vsNx8Lr8Z0WwcqNDclpqgxLlraPnmI+njN7fNE00JfTDRAjpBXdOdtfjaLPt vSBKgcP5cW4tsCvWF6itEnhIxkXDjMdSsmwXTT2ihqJvHY1sqO1wYZfrCyukxpBUJlTv 0WOjMbnlFMquHzsPiEYQ09B5SgQllvm+itaYv+6NlU730tPlRbWvvpP3ITTKqFPuZaee MGng== X-Received: by 10.66.149.102 with SMTP id tz6mr6352654pab.76.1402695257084; Fri, 13 Jun 2014 14:34:17 -0700 (PDT) Sender: Dave Yost From: Dave Yost X-Google-Original-From: Dave Yost Content-Type: multipart/alternative; boundary="Apple-Mail=_498F24C2-F9FF-422B-99B3-6426D1FB7216" Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: shell script that replaces the command line In-Reply-To: <140612234011.ZM4768@torch.brasslantern.com> Date: Fri, 13 Jun 2014 14:34:14 -0700 Cc: zsh-workers@zsh.org Message-Id: <8E27557A-CD91-4AE6-81F6-B4D8E1F6F513@yost.com> References: <5804CF24-1E69-4FD3-832C-4B642B010F86@yost.com> <140612234011.ZM4768@torch.brasslantern.com> To: Bart Schaefer X-Mailer: Apple Mail (2.1878.6) --Apple-Mail=_498F24C2-F9FF-422B-99B3-6426D1FB7216 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Thanks. This is OK, 0 Fri 0:08:54 DaveBook yost /Users/yost 215 Z% print -z echo foo 0 Fri 0:09:33 DaveBook yost /Users/yost 216 Z% echo foo but there must be a way to replace the current command line rather than = setting the contents of the next one, yes? On Thu 2014-06-12, at 11:40 PM, Bart Schaefer = wrote: > On Jun 12, 4:07pm, Dave Yost wrote: > } Subject: shell script that replaces the command line > } > } Can a shell function replace the command line contents? I know a > } widget can do it, but I can't see a way for a shell function to do > } that. >=20 > The "print -z ..." command loads the buffer stack, which is then = popped > into the editor buffer at the next prompt (e.g., after the calling > function/script exits). --Apple-Mail=_498F24C2-F9FF-422B-99B3-6426D1FB7216--