From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22759 invoked from network); 30 Jul 2006 18:36:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Jul 2006 18:36:23 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 74313 invoked from network); 30 Jul 2006 18:36:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jul 2006 18:36:16 -0000 Received: (qmail 22503 invoked by alias); 30 Jul 2006 18:36:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22564 Received: (qmail 22494 invoked from network); 30 Jul 2006 18:36:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 30 Jul 2006 18:36:13 -0000 Received: (qmail 73982 invoked from network); 30 Jul 2006 18:36:13 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 30 Jul 2006 18:36:12 -0000 Received: from torch.brasslantern.com ([71.116.116.250]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J3800JFQBO2DUB9@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 30 Jul 2006 13:36:03 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k6UIa1hx013460 for ; Sun, 30 Jul 2006 11:36:02 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k6UIa1tp013459 for zsh-workers@sunsite.dk; Sun, 30 Jul 2006 11:36:01 -0700 Date: Sun, 30 Jul 2006 11:36:01 -0700 From: Bart Schaefer Subject: Re: env -u completion doesn't work when there is a command In-reply-to: <20060730180031.GI17987@prunille.vinc17.org> To: zsh-workers@sunsite.dk Message-id: <060730113601.ZM13458@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20060730180031.GI17987@prunille.vinc17.org> Comments: In reply to Vincent Lefevre "env -u completion doesn't work when there is a command" (Jul 30, 8:00pm) On Jul 30, 8:00pm, Vincent Lefevre wrote: } } env -u LIBR[TAB] gcc } } where the cursor is after LIBR, the completion doesn't work. This is a generalized problem with _arguments, in that there's no way to specify that an option (-u in this case) has a mandatory argument that must be in a separate word. Consequently, when a "rest" specification ('*::arguments: _normal') appears and there is any ambiguity, it takes precedence. Probably something could be done to _arguments to change this, but I don't have my hip waders and piton hammer handy today. There are work-arounds possible in the caller of _arguments, mostly by examining $words[CURRENT-1] and modifying the _arguments specification. Maybe someone can suggest the best attack?