From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18928 invoked from network); 24 Jan 2009 14:37:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Jan 2009 14:37:53 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 52597 invoked from network); 24 Jan 2009 14:37:48 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Jan 2009 14:37:48 -0000 Received: (qmail 21228 invoked by alias); 24 Jan 2009 14:37:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26412 Received: (qmail 21216 invoked from network); 24 Jan 2009 14:37:42 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 24 Jan 2009 14:37:42 -0000 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.173]) by bifrost.dotsrc.org (Postfix) with ESMTP id 4593D80271F0 for ; Sat, 24 Jan 2009 15:37:38 +0100 (CET) Received: by wf-out-1314.google.com with SMTP id 29so5892865wff.3 for ; Sat, 24 Jan 2009 06:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KKJQRbxCeEUYU+adh2ncJ3zPIZr9S0mP7g0r7TC2J1g=; b=XM2u3Ti+jc5DYTbarXOWR6VRcQWKZebpABXS2SRx2sUCCpAQwyFMnTUcDs2KJ0GXc0 yw64292/2x8d3qYNwiyJ2slA0Ea0q7lX3gzaAxLyUDYz+F4UumylOhrdiGw92JTTY5qw GxPkDycdKTHRs0mqTfgiC2MBlMo3kzXWZdNUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=vVcgTV79JUnOuVlXO9VKs1tMBU5kw8mF75fDm0OWUHoibjqq2ihpaHFVkiNE4Zlfy6 /Svjt8f7hbhWDHHpmNpLyEe1j0W5A3ompg86R8pFhrU4ENDQoW+Urc8oIcCcM22epc+c RkQx5bIyakWPSkpEorhZsqfBpSKRsRdNmh3Sg= MIME-Version: 1.0 Received: by 10.143.159.11 with SMTP id l11mr2934794wfo.56.1232807857683; Sat, 24 Jan 2009 06:37:37 -0800 (PST) In-Reply-To: <2d460de70901100115x129a6405md5ca6ca8d1629c5c@mail.gmail.com> References: <2d460de70901100115x129a6405md5ca6ca8d1629c5c@mail.gmail.com> Date: Sun, 25 Jan 2009 01:37:37 +1100 Message-ID: <644fc65e0901240637n6ef09195p124771ecb1357526@mail.gmail.com> Subject: Re: Convention question regarding completions From: Doug Kearns To: "Zsh Hackers' List" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/8899/Sat Jan 24 14:06:33 2009 on bifrost X-Virus-Status: Clean On 1/10/09, Richard Hartmann wrote: > Hi all, > > when writing completions, should I XAND only the options > which are really mutually exclusive like > > tar x > tar c > > or should I XAND the ones which won't work but won't hurt, > either like > > --verbose > --quiet > > or should I XAND even the ones which become superfluous > like the second option in > > deluser --remove-all-files > deluser --remove-home > > ? > > Personally, I lean towards the third, i.e. most inclusive > XAND rule, but I am interested what the others think. Right, I don't think anyone is going to complain about your implementation being too complete. :) However, you'll see many of the completion functions tend to adopt the first (and a half) approach E.g. "(- *)--version" without specifying --version in any of the other option's exclusion lists because for many commands --version simply overrides the other options rather than producing an error. Regards, Doug