From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27489 invoked by alias); 15 Jan 2013 07:28:24 -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: 17564 Received: (qmail 3627 invoked from network); 15 Jan 2013 07:28: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=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.223.182 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:date:message-id:subject:from:to :content-type; bh=eEvcb3BMb7EwduHsqZ1qBx68Zcg7ucr43rnZYDeKJIs=; b=O1V8+zMURGwP7WhBRsf54QbFAOIxytiOoOlMRoCcQP+fa3KgPdXaHu/XP+y/ccFoiG eBMnYYNCJFVZuJsC4VRI+LZAhkhxAZ2bC6A6/Qt63BptI1DovM4WM1tBmY7wj+gL3UHd fEZ3hvWNZJQnmMl3KUtXpmYq9wsqDXoZ6AFGfTHGIYgP1uMUC+YNLl/dtvgal9ra29Hr W+P3YlVohOmYS4a7ftN/zfcPuxjt67+9V6VaMEAavPfavTaYmc8Di6cXPkn23Ad0d0JG JEVZys6UKUVKmmUdkrL+GunncuYUc+63bPhWWZccsqt8muDOKh1GwUlzoqZ9E3h9Z1kz tzSA== MIME-Version: 1.0 In-Reply-To: <130111063215.ZM11317@torch.brasslantern.com> References: <130111063215.ZM11317@torch.brasslantern.com> Date: Tue, 15 Jan 2013 08:28:14 +0100 Message-ID: Subject: Re: Completing all possible candidates From: =?ISO-8859-1?Q?Jesper_Nyg=E5rds?= To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=20cf30223ca171716804d34eb429 --20cf30223ca171716804d34eb429 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Great thanks, Bart! That worked very well. If anyone else is interested, here's my result: _my-prev-result() { local hstring if [[ $WIDGET =3D *-all-* ]]; then compstate[insert]=3Dall fi # Run last command again, save output in hstring hstring=3D$(eval $(fc -l -n -1)) # Split items on new-line into an array, quote each item compadd - ${(@f)hstring} } zle -C my-prev-comp menu-complete _my-prev-result bindkey '\ee' my-prev-comp zle -C my-all-prev-comp complete-word _my-prev-result bindkey '^xE' my-all-prev-comp On Fri, Jan 11, 2013 at 3:32 PM, Bart Schaefer w= rote: > On Jan 11, 12:30pm, Jesper Nyg=E5rds wrote: > } > } Simply stated, I want a key that says: "run the previous command line, > and > } put all the resulting output on the command line". How to do this? > > Take a look at Functions/Zle/keeper in the distributed set of examples. > It doesn't capture the same results that you are looking for, but it > has functions for copying those results to the command line. > --20cf30223ca171716804d34eb429--