From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5168 invoked from network); 26 Jul 2004 13:04:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Jul 2004 13:04:30 -0000 Received: (qmail 14290 invoked from network); 26 Jul 2004 13:04:24 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jul 2004 13:04:24 -0000 Received: (qmail 10998 invoked by alias); 26 Jul 2004 13:04:11 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20197 Received: (qmail 10982 invoked from network); 26 Jul 2004 13:04:11 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 26 Jul 2004 13:04:11 -0000 Received: (qmail 10223 invoked from network); 26 Jul 2004 13:02:19 -0000 Received: from main.gmane.org (80.91.224.249) by a.mx.sunsite.dk with SMTP; 26 Jul 2004 13:02:17 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Bp57Q-0002bz-00 for ; Mon, 26 Jul 2004 15:02:16 +0200 Received: from h-68-167-252-89.sttnwaho.dynamic.covad.net ([68.167.252.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jul 2004 15:02:16 +0200 Received: from oberyno by h-68-167-252-89.sttnwaho.dynamic.covad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jul 2004 15:02:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@sunsite.dk From: chris s Subject: Re: starting completions with =,<,> Date: Mon, 26 Jul 2004 06:06:54 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: h-68-167-252-89.sttnwaho.dynamic.covad.net User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) Sender: news X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=6.0 tests=BAYES_00 autolearn=no version=2.63 X-Spam-Hits: -4.9 Ok, I was looking more into this, and it turns out the bash completion is able to handle =, >=,<=. The bash person did this: local cur curword numwords compwords opts cond prepend .... cur="${COMP_WORDS[COMP_CWORD]}" .... # Check for conditional. cond="${cur%%[A-Za-z0-9]*}" cur="${cur:${#cond}}" [[ "${cond:0:1}" == "'" ]] && prepend="-P ${cond:1}" # Handle cases where a conditional is specified. if [[ "${cond}" ]]; then if [[ "${cur}" ]]; then if [[ "${cur}" == */* ]]; then ... and it seems to work. FYI, the bash completion for emerge is at http://sourceforge.net/projects/gentoo-bashcomp/ Anyway, I think I'm going to completely rewrite the zsh emerge completion to handle this sort of thing. In the above code, all I would have to do to make it zsh compatible would be change $COMP_WORDS variable to $words and $COMP_CWORD to $CURRENT , right? And prepend would be compadd -P? Thanks for your help.