From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23581 invoked from network); 21 Jan 2007 22:50:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Jan 2007 22:50:34 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 30084 invoked from network); 21 Jan 2007 22:50:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Jan 2007 22:50:26 -0000 Received: (qmail 15394 invoked by alias); 21 Jan 2007 22:50:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11136 Received: (qmail 15383 invoked from network); 21 Jan 2007 22:50:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Jan 2007 22:50:18 -0000 Received: (qmail 28996 invoked from network); 21 Jan 2007 22:50:18 -0000 Received: from mailfe05.tele2.fr (HELO swip.net) (212.247.154.140) by a.mx.sunsite.dk with SMTP; 21 Jan 2007 22:50:12 -0000 X-Cloudmark-Score: 0.000000 [] Received: from [213.103.81.156] (account eu1388219@tele2.fr HELO localhost) by mailfe05.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 290260437 for zsh-users@sunsite.dk; Sun, 21 Jan 2007 23:50:10 +0100 Date: Sun, 21 Jan 2007 23:50:10 +0100 From: "arno." To: zsh-users@sunsite.dk Subject: completion pb: non mandatory parameter for option Message-ID: <20070121225010.GA5435@localhost.localdomain> Mail-Followup-To: zsh-users@sunsite.dk MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I'm trying to get an updated completion for debian command debchange. It has on option : --news, and that option can take a file as a=20 parameter, but that is not mandatory. Handling of that case is (in perl) : $opt_news =3D 'debian/NEWS' if defined $opt_news and $opt_news eq ''; I'd like to have something similar to _alternative: completion for=20 --news parameter, and also for other parameters of debchange. If I use _alternative 'news file::_files' 'normal::_normal', I go in a infinite recursive function call If I just use _alternative 'news files::_files', I *must* enter a file=20 name before I return to normal completion Is there a way to do that ? thanks arno --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFs+4iiH9aBScBsrMRAuNXAKCg0euEkpFiQP28AOpKcvSkANRXmACgrJ8Q wQXgtGjraNaYIKGzThNqKSo= =4w8I -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--