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

_argument sets [was Re: a couple of completion questions]



> I know nothing about dpkg and friends. In which way does it behave
> differently from what's documented and how do you make use of it
> (i.e.: is there something wrong? or only documented in the wrong way?
> or should have both what it's doing and what's documented?)?

Okay, first off, this is what I want.  <arg> is meant to be
-i, -A, or the long-option equivalents.

dpkg <arg> <TAB> right now completes _files -g \*.deb by default.
If I remove the -A to _arguments, it will complete $_dpkg_options.
Ideally, it should complete _files -g \*.deb, $_dpkg_options,
and $_dpkg_options_recursive, unless one of $_dpkg_options_recursive
is present, in which case it should complete directories instead of
\*.deb.  BTW, I swapped the positions of -C and -A to _arguments.

It does this, except for completing $_dpkg_options or
$_dpkg_options_recursive.  Or rather, it will for

dpkg --install --<TAB>
dpkg --install -<TAB>
dpkg --install -O<TAB>

but it won't complete for

dpkg --install --a<TAB>

So if I type dpkg --install --<TAB> I get --abort-after,
but if I type --a<TAB>, I get corrections.



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