From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22292 invoked by alias); 11 Jan 2013 11:37:27 -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: 17552 Received: (qmail 10884 invoked from network); 11 Jan 2013 11:37:25 -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.175 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=9q/gFNlnFEHIS+MLm4vz0WvY3u4urYEd/5wAShSJR+k=; b=NSnFkj2xNvI75h12bBs1XakhtPJU/4PNZgOdLiOj24VYaXoCYwHLwnak4GmU7BCBmv HI7BXKSB3nsPxBNBhXj0TObLxkdT0omHJxA6B7MiqEwDCQ0zFrd7KcJx0FZ6+qKGqudw hV6CaL2G3wzfiLq1fxb9HABUzQcxho1sN3LBpdGt0gP2iHTG04hnv9X1ihwmIskHqv+k /tpjoaUihqTaaS7GsvDD4983R9Q5MKO1Cwq+eoqz5Zhy9MDefavzv6xF43VO3qxN4IZn Nf9hA+nfBadgxPnTknusKsBq21AaIweLg8vndz7Sg7nSN/Wf18ej7pdq+QnUDseCMd3/ HpyA== MIME-Version: 1.0 X-Received: by 10.50.40.135 with SMTP id x7mr8585353igk.79.1357903856376; Fri, 11 Jan 2013 03:30:56 -0800 (PST) Date: Fri, 11 Jan 2013 12:30:56 +0100 Message-ID: Subject: Completing all possible candidates From: =?ISO-8859-1?Q?Jesper_Nyg=E5rds?= To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=14dae93408afff9aba04d301a09f --14dae93408afff9aba04d301a09f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable For quite a while, I've used the following when I want completion from the output of a previous command: _my-prev-result() { local hstring # Run last command again, save output 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-rev-prev-comp reverse-menu-complete _my-prev-result bindkey '\eE' my-rev-prev-comp This allows me to for example use "locate foo", and then complete the next command with the found files (the drawback is of course that the previous command could take a while to run). I know about the "keeper" functions in the zsh distribution, but this is simpler. Anyway, I recently realized that I sometimes could have use for putting ALL the possibilities on the command line with a keystroke, =E0 la the "all-matches" example under _all_matches in the zsh manual. In fact, I suspect the _all_matches completer should be involved somehow, but I have failed to find out how. 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? --14dae93408afff9aba04d301a09f--