From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7501 invoked from network); 29 Oct 2004 15:22:46 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Oct 2004 15:22:46 -0000 Received: (qmail 90455 invoked from network); 29 Oct 2004 15:22:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Oct 2004 15:22:40 -0000 Received: (qmail 8870 invoked by alias); 29 Oct 2004 15:21:46 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8143 Received: (qmail 8847 invoked from network); 29 Oct 2004 15:21:43 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Oct 2004 15:21:43 -0000 Received: (qmail 89169 invoked from network); 29 Oct 2004 15:20:44 -0000 Received: from hydrogen.ucsc.edu (128.114.41.29) by a.mx.sunsite.dk with SMTP; 29 Oct 2004 15:20:43 -0000 Received: from localhost (wgscott@localhost) by hydrogen.ucsc.edu (8.12.11/8.12.11) with ESMTP id i9TFHLHc010881; Fri, 29 Oct 2004 08:17:21 -0700 (PDT) X-Authentication-Warning: hydrogen.ucsc.edu: wgscott owned process doing -bs Date: Fri, 29 Oct 2004 08:17:21 -0700 (PDT) From: William Scott To: DervishD cc: zsh-users@sunsite.dk Subject: Yet another completion question In-Reply-To: <20041027184948.GA10764@DervishD> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Folks: I have a completion that works in the old form and would like to write a completion function. This is for a command called "open" on Apple OS X. eg: open -a Netscape is the functional equivalent of clicking on the Netscape application, eg: open -a Microsoft\ Word opens the devil's ware, etc. I have a function that produces a list of applications, complete with escaped spaces, like this: Microsoft\ Word NFS\ Manager Nemo_invoker NetInfo\ Manager NetRestore NetRestore\ Helper Netscape and I am using compctl to read in a file it produces, since this takes awhile to produce: compctl -f -x 'c[-1,-a] p[2,2]' -s "$(cat ~/.zshapplist)" \ -M 'm:{A-Za-z}={a-zA-Z} r: ||[^ ]=**' -- open This works. I figured out the -s was critical to getting this to work right with the applications having escaped spaces. But what I would like to do is use the new completion system and cache these completions in the proper z-shell manner. I can't seem to figure out how to use compadd syntax in analogy to the -s option of compctl. I would be grateful for any and all suggestions. Bill Scott William G. Scott Associate Professor Department of Chemistry and Biochemistry and The Center for the Molecular Biology of RNA Sinsheimer Laboratories University of California at Santa Cruz Santa Cruz, California 95064 USA