From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14745 invoked by alias); 12 Jul 2013 23:47:14 -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: 31514 Received: (qmail 11386 invoked from network); 12 Jul 2013 23:47:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130712164652.ZM12696@torch.brasslantern.com> Date: Fri, 12 Jul 2013 16:46:52 -0700 In-reply-to: <51DFA641.6080204@goots.org> Comments: In reply to Nick Cross "[PATCH] Update make completion with gnu options" (Jul 12, 7:46am) References: <51DFA641.6080204@goots.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Nick Cross , zsh-workers@zsh.org Subject: Re: [PATCH] Update make completion with gnu options MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jul 12, 7:46am, Nick Cross wrote: } } - file=($opt_args[(K)(-f|--file|--makefile)]) } - file=$file[1] } + file=${(v)opt_args[(I)(-f|--file|--makefile)]} The (I) subscript flag returns an array of all the possible matching elements, so if there happens to be more than one file option the above will not assign a useful file name to $file.