Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_arguments -C … && ret=0 or _arguments -C … && return 0
- X-seq: zsh-workers 29576
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: _arguments -C … && ret=0 or _arguments -C … && return 0
- Date: Thu, 21 Jul 2011 15:57:37 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=+x/EzejeVrU/I2S/4kUMty84zp2W4fuA1j8AMDKsHNg=; b=afnzSpIjSc5hyLFoc7pIlHFckrzRghgUN4AkkzyUDgYFafyGQaKlncjJzX/ki5b/oh JfDvwRWZeSoy5+2rjPA2bKwrhCGTz+qknblq99JSHjcyeijqCWyopFRvWa4B86FLFg24 rrYBgUczRg3P9r8IgRJc40hrYjlBBc+Azyp0c=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: nikolai.weibull@xxxxxxxxx
Hi!
What’s the preferred way of dealing with _arguments calls that may use actions?
Etc/completion-style-guide suggests using _arguments -C … && return 0,
but many completion definitions use _arguments -C … && ret=0.
For example, Completion/Unix/Command/_bzip2 uses the_arguments -C … &&
ret=0 style. This leads to files matching -* being included as
completions. Is this desired behavior, or is it simply a bug?
Current behavior:
% touch ./--hello
% bzip2 --h^I
[option]
--help display help message
[file to compress]
--hello
For most commands, completing a file name that looks like an option
will result in an error, so my gut feeling is that we should return
instead of looking for the additional possible completions.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author