From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24216 invoked from network); 23 May 2005 15:34:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 May 2005 15:34:11 -0000 Received: (qmail 74041 invoked from network); 23 May 2005 15:34:04 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 May 2005 15:34:04 -0000 Received: (qmail 5470 invoked by alias); 23 May 2005 15:33:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8898 Received: (qmail 5456 invoked from network); 23 May 2005 15:33:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 May 2005 15:33:55 -0000 Received: (qmail 72995 invoked from network); 23 May 2005 15:33:55 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 23 May 2005 15:33:50 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IGY00JOU8KCBOBD@vms046.mailsrvcs.net> for zsh-users@sunsite.dk; Mon, 23 May 2005 10:33:49 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j4NFXjsc017306 for ; Mon, 23 May 2005 08:33:47 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j4NFXj2d017305 for zsh-users@sunsite.dk; Mon, 23 May 2005 08:33:45 -0700 Date: Mon, 23 May 2005 15:33:44 +0000 From: Bart Schaefer Subject: Re: retrieving the results of last command? In-reply-to: To: Zsh User Message-id: <1050523153345.ZM17304@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050520121834.GA32499@let.rug.nl> <1050520144942.ZM7191@candle.brasslantern.com> Comments: In reply to Felix Rosencrantz "Re: retrieving the results of last command?" (May 22, 11:45pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On May 22, 11:45pm, Felix Rosencrantz wrote: } } Is there a way to configure completion, so that it will first attempt } to only complete items that it would normally complete but are only in } the keep list of the keeper function, and if there is nothing there } complete as it normally would. You'd need a trick like the one done in _expand_word_and_keep, where you redefine compadd and then call completion. The redefined compadd would compare its arguments to $kept and call the real compadd only for those that are present. However, that'd be very difficult to do accurately, because of the wide variety of ways that potential matches can be passed to compadd. Your wrapper for compadd would have to take into account prefixes and suffixes, arrays passed by name rather than value, etc.