From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10749 invoked from network); 3 Jan 2003 06:35:51 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Jan 2003 06:35:51 -0000 Received: (qmail 18545 invoked by alias); 3 Jan 2003 06:35:37 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5635 Received: (qmail 18532 invoked from network); 3 Jan 2003 06:35:36 -0000 Date: Fri, 3 Jan 2003 14:35:32 +0800 From: James Devenish To: zsh-users@sunsite.dk Subject: Re: Reinsertion of file prefix for accepted completion? Message-ID: <20030103063532.GA17025@gulag.guild.uwa.edu.au> Mail-Followup-To: zsh-users@sunsite.dk References: <20030103043321.GC14622@gulag.guild.uwa.edu.au> <1030103055654.ZM28760@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030103055654.ZM28760@candle.brasslantern.com> User-Agent: Mutt/1.3.28i In message <1030103055654.ZM28760@candle.brasslantern.com> on Fri, Jan 03, 2003 at 05:56:53AM +0000, Bart Schaefer wrote: > On Jan 3, 12:33pm, James Devenish wrote: > } Is there some way...to reinsert a compadd -W file prefix when > } the completion is accepted? > Not really, no. // It's a completion system, not an abbreviation > system. The focus is on producing on the command line an argument > in the form that is expected by the command. At least are such special cases as $cdpath (thankfully)! > If you have a particular command for which you'd like to be able to use > abbreviated file names as arguments, then write a wrapper function [...] > However, you don't both get to use the abbreviations *and* see the full > paths in the command history. [...] > If you *really* wanted to work for it, you could write a new ZLE widget > to replace accept-line, I am tempted to look into the latter, but the number of users who could benefit from it (as opposed to having no use for it or being harmed by it) is so small, the wrapper sounds fine. It is specifically to do with the BSD ports management commands, so there are a few restrictions that it (the thing I wanted to achieve) both pertinent and relatively risk free. I will be asking for comments presently, so I guess I'll get some reactions then. I have a compromise in mind. PS. I am really impressed with the quality of the answers I've received from people on the zsh mailing lists (including off-list). Thank you.