From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11066 invoked by alias); 12 May 2011 17:22:35 -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: 29248 Received: (qmail 15923 invoked from network); 12 May 2011 17:22:34 -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: <110512102212.ZM13868@torch.brasslantern.com> Date: Thu, 12 May 2011 10:22:12 -0700 In-reply-to: <110512101422.ZM13822@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: PATCH: Make _xset complete more helpfully" (May 12, 10:14am) References: <110512101422.ZM13822@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers Subject: Re: PATCH: Make _xset complete more helpfully MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On May 12, 10:14am, Bart Schaefer wrote: } } 27 [[ "$_type$_noprefix" = options && ! -prefix [-+]* ]] && \ } 28 zstyle -T ":completion:${curcontext}:options" prefix-needed && } 29 return 1 } } I'm not sure it's correct for it to entirely punt when prefix-needed } is not defined. Probably the right thing would be to assume a default } value instead ... but I don't really know. Ah. Seems punting when not defined is equivalent to assuming a default value of "true": For command options, this means that the initial `-', `+', or `--' must be typed explicitly before option names will be completed. So changing _xset to use -O instead *is* the correct fix.