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

completion functions with _arguments -A "-*" and the _approximate completer



Hi folks!

I noticed that a few completion functions don't work work together
with the _approximate completer properly, namely all functions that
contain the argument '-A "-*"' in the _arguments command, like _gpg
does, for example.

Usual behaviour is this:

    zsh> gpg --alwasy<Tab>
    no more arguments

If I remove the -A part, approximation works as expected:

    zsh> gpg --alwasy<Tab>
    zsh> gpg --always-trust

The manual states: ``For example, to make _arguments stop completing
options after the first normal argument, but ignoring all strings
starting with a hyphen even if they are not described by one of the
optspecs, the form is `-A "-*"'.''

But shouldn't _arguments give _approximate a chance to complete an
option name that was just mis-spelled? IMO this breaks consitency
because you cannot rely on _approximate correcting the option name.

Or am I wrong here?

Julius



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