From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21840 invoked from network); 20 May 2005 17:13:22 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 May 2005 17:13:22 -0000 Received: (qmail 20382 invoked from network); 20 May 2005 17:13:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 May 2005 17:13:14 -0000 Received: (qmail 3370 invoked by alias); 20 May 2005 17:13:07 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8879 Received: (qmail 3359 invoked from network); 20 May 2005 17:13:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 May 2005 17:13:06 -0000 Received: (qmail 19306 invoked from network); 20 May 2005 17:13:06 -0000 Received: from viefep16-int.chello.at (213.46.255.17) by a.mx.sunsite.dk with SMTP; 20 May 2005 17:12:57 -0000 Received: from Dingo ([213.47.104.218]) by viefep16-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050520171256.DTAI551.viefep16-int.chello.at@Dingo> for ; Fri, 20 May 2005 19:12:56 +0200 From: Christian Taylor To: "zsh-users" Subject: Re: retrieving the results of last command? Date: Fri, 20 May 2005 19:11:16 +0200 User-Agent: KMail/1.8 References: <20050520121834.GA32499@let.rug.nl> <1050520144942.ZM7191@candle.brasslantern.com> In-Reply-To: <1050520144942.ZM7191@candle.brasslantern.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="Boundary-00=_0ohjClCeyGkzvRU" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505201911.16166.cht@chello.at> X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.3 required=6.0 tests=AWL,BAYES_00,HTML_30_40, HTML_MESSAGE autolearn=ham version=3.0.2 X-Spam-Hits: -2.3 --Boundary-00=_0ohjClCeyGkzvRU Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit On Friday 20 May 2005 16:49, Bart Schaefer wrote: > On May 20, 2:18pm, Francisco Borges wrote: > } > } Often I'm in the situation of using say: > } > } % locate a-file > } /usr/share/prog/a-file > } % > } > } Then I want to use the pathname to copy the file. > > [snip] > > I also have > > bindkey -s '\ev' '\e`vi ' > > so that ESC-v leaves me with "vi $( ... )" but I don't use that one much > any more, for some reason. I have something similar that I use for purposes mentioned in the original posting: bindkey -s '\ei' '^U\e>`^Y`' In the example it would work like this: % locate a-file /usr/share/prog/a-file % cp [now I go to the history entry I want and press ESC-i] % cp `locate a-file` I guess it's not very elegant, since it depends on the default keybindings ^U, ESC-> and ^Y, but I hope it may be of use to someone. Christian --Boundary-00=_0ohjClCeyGkzvRU Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit

On Friday 20 May 2005 16:49, Bart Schaefer wrote:

> On May 20, 2:18pm, Francisco Borges wrote:

> }

> } Often I'm in the situation of using say:

> }

> } % locate a-file

> } /usr/share/prog/a-file

> } %

> }

> } Then I want to use the pathname to copy the file.

>

> [snip]

>

> I also have

>

> bindkey -s '\ev' '\e`vi '

>

> so that ESC-v leaves me with "vi $( ... )" but I don't use that one much

> any more, for some reason.

I have something similar that I use for purposes mentioned in the original posting:

bindkey -s '\ei' '^U\e>`^Y`'

In the example it would work like this:

% locate a-file

/usr/share/prog/a-file

% cp [now I go to the history entry I want and press ESC-i]

% cp `locate a-file`

I guess it's not very elegant, since it depends on the default keybindings ^U, ESC-> and ^Y, but I hope it may be of use to someone.

Christian

--Boundary-00=_0ohjClCeyGkzvRU--