From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6721 invoked from network); 9 Jan 2003 16:10:33 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 9 Jan 2003 16:10:33 -0000 Received: (qmail 2008 invoked by alias); 9 Jan 2003 16:10:26 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18067 Received: (qmail 2000 invoked from network); 9 Jan 2003 16:10:26 -0000 X-VirusChecked: Checked X-Env-Sender: kiddleo@logica.com X-Msg-Ref: server-22.tower-4.messagelabs.com!1042128556!37763 X-Authentication-Warning: iris.logica.co.uk: Host [158.234.142.11] claimed to be finches.logica.co.uk cc: zsh-workers@sunsite.dk In-reply-to: <6134254DE87BD411908B00A0C99B044F03A0B5CF@MOWD019A> From: Oliver Kiddle References: <6134254DE87BD411908B00A0C99B044F03A0B5CF@MOWD019A> To: Borzenkov Andrey Subject: Re: Passsing descriptions down in completion functions Date: Thu, 09 Jan 2003 17:11:34 +0100 Message-ID: <32584.1042128694@finches.logica.co.uk> Sender: kiddleo@logica.com On 9 Jan, you wrote: > > Sure, I understand that. We already discussed it and I still think that > instead of modifying every completion function _all_labels should just check > for existing options and not add them (are there more than just -X? As I -J and perhaps also -V, -E, -1 and -2. It'd be hard to know which to check for. > understand the only options that can be modified by _all_labels are those > used for explanations. It does not look all that simple after reviewing > _all_labels but it should be doable). There are cases where you do want to override any passed descriptions such as where a function completes something in parts (e.g. in _urls) but you might want to pass on other options. I'm not too sure about your suggested change to _all_labels because the result would be less flexible. If you wanted a solution like that, it might be better to always add explanations to the end of the options unless some option was passed to _all_labels. I think the current system is simpler but will concede that modifying all the functions will be a bore. I'll volunteer for the job if we agree on doing that though. > The general question - should completion functions ever accept (be used > with) other options than compadd? If not the above is perfectly valid and > probably more simple that modifying every single function. If yes, here is > the list of functions that use _wanted without '-'. Quite a few functions accept non compadd options though zparseopts can easily strip them before they get passed to compadd. Provided they don't conflict, I don't see a problem with this. Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.