zsh-users
 help / color / mirror / code / Atom feed
* completion pb: non mandatory parameter for option
@ 2007-01-21 22:50 arno.
  0 siblings, 0 replies; only message in thread
From: arno. @ 2007-01-21 22:50 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

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 
parameter, but that is not mandatory.

Handling of that case is (in perl) :
$opt_news = 'debian/NEWS' if defined $opt_news and $opt_news eq '';

I'd like to have something similar to _alternative: completion for 
--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 
name before I return to normal completion

Is there a way to do that ?

thanks
arno

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-21 22:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-21 22:50 completion pb: non mandatory parameter for option arno.

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).