zsh-users
 help / color / mirror / code / Atom feed
From: "arno." <arno.@no-log.org>
To: zsh-users@sunsite.dk
Subject: completion pb: non mandatory parameter for option
Date: Sun, 21 Jan 2007 23:50:10 +0100	[thread overview]
Message-ID: <20070121225010.GA5435@localhost.localdomain> (raw)

[-- 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 --]

                 reply	other threads:[~2007-01-21 22:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070121225010.GA5435@localhost.localdomain \
    --to="arno."@no-log.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).