From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 478 invoked from network); 8 Sep 2003 20:28:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Sep 2003 20:28:37 -0000 Received: (qmail 10932 invoked by alias); 8 Sep 2003 20:28:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6542 Received: (qmail 10923 invoked from network); 8 Sep 2003 20:28:24 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 8 Sep 2003 20:28:24 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.58.69.233] by sunsite.dk (MessageWall 1.0.8) with SMTP; 8 Sep 2003 20:28:24 -0000 Received: by cherry.fruitcom.com (Postfix, from userid 1000) id 151BC57C6D; Mon, 8 Sep 2003 22:21:55 +0200 (CEST) Date: Mon, 8 Sep 2003 22:21:54 +0200 From: Eric Smith To: Zsh Users Subject: Re: preexec function to work after `&&' -> tab completion for preexec Message-ID: <20030908202152.GC23793@fruitcom.com> References: <20030813131429.GA2413@fruitcom.com> <20030908191720.GR6280@strindberg.student.uu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030908191720.GR6280@strindberg.student.uu.se> User-Agent: Mutt/1.5.3i Hi Alas I cannot take credit for this mimecap for the command line, that is due to the redoubtable Bart Schaefer who replied to a question I posted on the list. I just brainlessly extended it. I use it constantly with screen(1) cutting and pasting and could not imagine life without it. I have some function like print -l (#i)*$1* print matching files and then move up in screen copy mode to the wanted file and hit a button and the file is pasted onto the command line with enter automatically appended and the file opens with its associated application. (This is made practical by my quirky policy of not using subdirs much and having all files in a single dir - using `_' to give descriptive "classes" to filenames). Thanks Jesper for asking the question about completion. Its been on the tip of my tongue for months - just did not get round to posting it. ciao > > fi > > > > I only now found the time to experiment with Eric's neat preexec function, > and it's very nice. However, I'd like it to also work with tab completion, > is that possible? > > I.e. say I have a file in my current directory called "foo.pdf". Writing > "./foo.pdf" on the command line starts acroread with the file as an > argument, just as I wanted, but I cannot type "./fo" and have a > completion of the file name. I'm not even sure this would be desirable in > the general case, as I'm normally not interested in completing regular > files in the first position, but would it be possible to for example > specify that files in the current directory should be completed? Or is > there a better way to solve this problem that I haven't thought about? > > TIA, > > Jesper > > > -- > Jesper Holmberg |"But how can | > jesper.holmberg@enst-bretagne.fr | one be warm | > ENST Br, BP 832, 29285 Brest, FRANCE | alone?" | -- Eric Smith Fruitcom BV Tel: +31 15 750 2364 Fax: +31 15 219 0524 Mobile: +31 6 551 76300 PO Box 2855 2601 CW Delft The Netherlands