* completion functions with _arguments -A "-*" and the _approximate completer
@ 2008-07-30 13:13 Julius Plenz
2008-07-30 20:27 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Julius Plenz @ 2008-07-30 13:13 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: completion functions with _arguments -A "-*" and the _approximate completer
2008-07-30 13:13 completion functions with _arguments -A "-*" and the _approximate completer Julius Plenz
@ 2008-07-30 20:27 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2008-07-30 20:27 UTC (permalink / raw)
To: zsh-workers
On Wed, 30 Jul 2008 15:13:39 +0200
Julius Plenz <julius@plenz.com> wrote:
> 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
>...
> 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.
Yes, I think you're right. I have no idea how to do it, though.
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-30 13:13 completion functions with _arguments -A "-*" and the _approximate completer Julius Plenz
2008-07-30 20:27 ` Peter Stephenson
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).