Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Conflict between *:foo:_files and -o:bar:_files
> On Fri, 7 Mar 2008 14:33:23 +0100
> Haakon Riiser <haakon.riiser@xxxxxxxxxx> wrote:
>> For some reason, calling the app as
>>
>> $ app input -o <PRESS-TAB-HERE>
>>
>> and then using ZSH's completion system to generate alternatives
>> for -o, the _files completer is called twice with two different
>> descriptions:
>>
>> output file
>> file1 file2 file3 (etc)
>> input file
>> file1 file2 file3 (etc)
>
> (Posting this to zsh-users as a help request rather than zsh-workers as a
> bug report earns you the award "optimist of the week".)
:-) Actually, I wasn't sure it was a bug: zsh's _arguments
function alone is more complicated than many other stand-alone
applications, so I assumed it was just a feature that could be
fixed using some obscure feature. When deciding where to post, I
placed my trust in the completion system's endless configurability
and you guys' seemingly supernatural ability to keep track of
it all. I guess that makes me an optimist, but it has worked
for me before. :-)
> I tracked this down through the uncommented mess of shell functions to
> the uncommented mess of C support files below that. I've put in quite a
> specific fix: if there are similar cases where _arguments is completing
> too much it should be possible to change the code again without the
> two-hour battle I had this time.
>
> The appropriate test, Y03arguments.ztst, still passes, but you'll
> appreciate I can't guarantee this has no side effects.
>
> Index: Src/Zle/computil.c
> ===================================================================
> [...]
Seems to work perfectly; thank you for putting in so much work to
fix this!
--
Haakon
Messages sorted by:
Reverse Date,
Date,
Thread,
Author