From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10693 invoked by alias); 12 Jul 2013 04:26:27 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17866 Received: (qmail 853 invoked from network); 12 Jul 2013 04:26:21 -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: <130711212600.ZM7466@torch.brasslantern.com> Date: Thu, 11 Jul 2013 21:26:00 -0700 In-reply-to: <51DF2E90.4070606@goots.org> Comments: In reply to Nick Cross "Re: Make Completion" (Jul 11, 11:15pm) References: <51DD616D.2090200@goots.org> <20130711105453.1615bb3b@pwslap01u.europe.root.pri> <51DF2E90.4070606@goots.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Make Completion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jul 11, 11:15pm, Nick Cross wrote: } } "file=($opt_args[(K)(-f|--file|--makefile)])" does not seem to be } returning a valid string/file PWS has a bit of a think-o there. (K) means to treat the keys of the array as patterns and compare them to the subcript expression. What he wants is (I), which compares the subscript as a pattern to the keys of the array -- but that returns the keys, not the values, so what is needed is ${(v)opt_args[(I)(-f|--file|--makefile)]} to force values to be returned.