From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11498 invoked from network); 12 Oct 2006 02:47:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.6 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 Oct 2006 02:47:01 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 65311 invoked from network); 12 Oct 2006 02:46:54 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 Oct 2006 02:46:54 -0000 Received: (qmail 16163 invoked by alias); 12 Oct 2006 02:46:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22870 Received: (qmail 16153 invoked from network); 12 Oct 2006 02:46:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 12 Oct 2006 02:46:50 -0000 Received: (qmail 64784 invoked from network); 12 Oct 2006 02:46:50 -0000 Received: from flock1.newmail.ru (80.68.241.157) by a.mx.sunsite.dk with SMTP; 12 Oct 2006 02:46:48 -0000 Received: (qmail 2732 invoked from network); 12 Oct 2006 02:46:47 -0000 Received: from unknown (HELO cooker.local) (arvidjaar@newmail.ru@85.140.243.49) by smtpd.newmail.ru with SMTP; 12 Oct 2006 02:46:47 -0000 From: Andrey Borzenkov To: zsh-workers@sunsite.dk Subject: Re: PATCH: update _mozilla Date: Thu, 12 Oct 2006 06:46:40 +0400 User-Agent: KMail/1.9.4 References: <20061011194256.GA31141@localhost.localdomain> In-Reply-To: <20061011194256.GA31141@localhost.localdomain> Cc: "arno." Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610120646.46047.arvidjaar@newmail.ru> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 11 October 2006 23:42, arno. wrote: > Hi, there is a _mozilla completion that can also be used for firefox > A few options are set differently for firefox and mozilla. > Option '-edit' is available for both but works only in mozilla > Option '-CreateProfile' is available for mozilla only but works for both in this case you need to use $service in completion function to distinguish between the two and use correct options. Usually it is done like common_opts=(optspec optspec2 ...) case $service in cmd1 ) _arguments $common_opts cmd1_optsec1 cmd1_optspec2 ... ;; cmd2 ) _arguments $common_opts cmd2_optspec1 cmd2_optspec2 ... ;; ... esac completion system sets $service to the name of command for which we complete. Then just stick firefox in #compdef line. > diff -r1.7 _mozilla > 6c6 please send a unified diff in future. thank you - -andrey -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFLayVR6LMutpd94wRAqiPAJ9mK9qU+X0inoqJ64pcAkgnWDtCkgCfXuvu ZrPsoQzTDqWnFWcCoxZBYyI= =VJrL -----END PGP SIGNATURE-----