From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16049 invoked by alias); 25 Oct 2011 16:05:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29858 Received: (qmail 1195 invoked from network); 25 Oct 2011 16:05:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <111025090445.ZM1600@torch.brasslantern.com> Date: Tue, 25 Oct 2011 09:04:45 -0700 In-reply-to: Comments: In reply to foudfou "compadd --" (Oct 25, 4:33pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: compadd -- MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 25, 4:33pm, foudfou wrote: } } It looks like '-' and '--' don't have the same effect in compadd. } } For example, the following completion function produces "_systemctl_test:compadd:2: bad option: -.": } } _systemctl_test() } { } compadd -- -.mount boot.mount } } } } Whereas it works well with '-'. Hmm. This is a relatively new problem; here's zsh 4.2.0: schaefer[505] compdef _systemctl_test foo schaefer[506] foo -.mount boot.mount Here's 4.3.12-dev-1 1.5473: torch% foo _systemctl_test:compadd:2: bad option: -. The problem seems to be that the generic option parser has already removed the "--" option before bin_compadd is even called, even though the declaration BUILTIN("compadd", 0, bin_compadd, 0, -1, 0, NULL, NULL) says that compadd is going to do all its own option parsing. This probably affects some other builtins as well.