From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21308 invoked from network); 31 Aug 2004 15:05:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Aug 2004 15:05:33 -0000 Received: (qmail 38783 invoked from network); 31 Aug 2004 15:05:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Aug 2004 15:05:27 -0000 Received: (qmail 28347 invoked by alias); 31 Aug 2004 15:04:39 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7957 Received: (qmail 28330 invoked from network); 31 Aug 2004 15:04:39 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 31 Aug 2004 15:04:39 -0000 Received: (qmail 36131 invoked from network); 31 Aug 2004 15:03:16 -0000 Received: from main.gmane.org (80.91.224.249) by a.mx.sunsite.dk with SMTP; 31 Aug 2004 15:03:15 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1C2AAE-0007vG-00 for ; Tue, 31 Aug 2004 17:03:14 +0200 Received: from cpc3-oxfd4-4-0-cust194.oxfd.cable.ntl.com ([80.3.247.194]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2004 17:03:14 +0200 Received: from david by cpc3-oxfd4-4-0-cust194.oxfd.cable.ntl.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2004 17:03:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: zzapper Subject: Re: Tip of the day: previous command output Date: Tue, 31 Aug 2004 16:03:06 +0100 Message-ID: References: <20040819085812.GL22962@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cpc3-oxfd4-4-0-cust194.oxfd.cable.ntl.com X-Newsreader: Forte Agent 2.0/32.652 trialware Sender: news X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.6 required=6.0 tests=BAYES_10,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 0.6 On Thu, 19 Aug 2004 10:58:12 +0200, wrote: >Someone asked for zsh tips a couple of weeks ago. Here's something I use >a lot. I got the basic idea from some user group somewhere, and then I've >tweaked the idea to suit my needs. > >The motivation for the following snippet is the fact that I often do a 'find' >or a 'locate' to find some files I'm interested in, and then want to do some >action on one of the files I just found. This function provides a way to put >completions from the output of the previous command on the command line. > >_jh-prev-result () { > hstring=$(eval `fc -l -n -1`) > set -A hlist ${(@s/ >/)hstring} > compadd - ${hlist} >} > >zle -C jh-prev-comp menu-complete _jh-prev-result >bindkey '\ee' jh-prev-comp > Anyone care to do a summary of this thread? Not being lazy I hope, but there's some quite advanced stuff! zzapper (vim, cygwin, wiki & zsh) -- vim -c ":%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?" http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips