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

_arguments -C … && ret=0 or _arguments -C … && return 0



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