Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

completion pb: non mandatory parameter for option



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: signature.asc
Description: Digital signature



Messages sorted by: Reverse Date, Date, Thread, Author