From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27452 invoked from network); 27 Oct 2004 13:24:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 27 Oct 2004 13:24:41 -0000 Received: (qmail 71543 invoked from network); 27 Oct 2004 13:24:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 27 Oct 2004 13:24:34 -0000 Received: (qmail 2124 invoked by alias); 27 Oct 2004 13:24:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8132 Received: (qmail 2109 invoked from network); 27 Oct 2004 13:24:21 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 27 Oct 2004 13:24:21 -0000 Received: (qmail 69954 invoked from network); 27 Oct 2004 13:23:23 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 27 Oct 2004 13:23:22 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212]:55065 helo=dervishd.net) by ns9.hostinglmi.net with esmtpa (Exim 4.43) id 1CMnlp-0007ae-MX for zsh-users@sunsite.dk; Wed, 27 Oct 2004 15:23:22 +0200 Date: Wed, 27 Oct 2004 15:26:10 +0200 From: DervishD To: Zsh Users Subject: compsys issues Message-ID: <20041027132610.GA9928@DervishD> Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i Organization: DervishD X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi all :) As I told a couple of messages ago, I'm playing with the new completion system but without using the set of functions shipped with zsh, since I want to learn as goog as I can how it works. Obviously, this leads to problems... Anyway, I want to ask you a question about compsys. Let's say I set up this simple widget for learning: # expand-or-complete is currently bound to zle -C expand-or-complete expand-or-complete _completer function _completer () { compstate[insert]=${compstate[insert]//tab /} compadd -f - $PREFIX*(/) return 0 } When I write 'cd ' at the prompt and hit tab, I'm presented with the list of subdirs in the current dir (e.g): $ cd Projects/ Music/ Work/ temporary/ Let's say I pick 'Projects' and hit tab again. Now I'm presented with this: $ cd Projects/ Projects/mta/ Projects/zsh-things/ Projects/more/ But what I want is to be presented with: $ cd Projects/ mta/ zsh-things/ more/ that's what I'm presented with the default .expand-or-complete widget, and that's the behaviour I want. I've tried tweaking IPREFIX and PREFIX (with and without the help from compset), I've tried generating the list of matches before calling compadd, cleaning the undesired part before, etc. and nothing works. I've read the info pages for compadd, compset, the special parameters for completion and I've even taken a look at the provided functions and I've not learnt anything :((( I've even eat a segfault or two when using compadd with the '-p' option. Could anybody lend me a hand and explain me how all this works so I can keep on practicing? Thanks a lot in advance :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.dervishd.net & http://www.pleyades.net/