On Fri, Apr 13, 2012 at 7:57 AM, Maxim Gonchar <gma...@gmail.com> wrote:
> On Fri, 13 Apr 2012 00:45:27 +0400, SanskritFritz <sanskritfr...@gmail.com>
> wrote:
>
> Consider this foo.fish file:
>>
>> complete --command foo --no-files --short-option a --long-option
>> 'an_example' --description 'example A'
>> complete --command foo --no-files --arguments '(sleep 5s)' --description
>> 'slept'
>>
>> Type in the shell
>>
>> foo -
>>
>> and press tab. 5 seconds pass, before we get the result. If I delete the
>> second line from foo.fish, the result is instantanious. AFAIK, the
>> --arguments should not be executed when fish is completing options for a
>> command.
>>
>> Is this a serious bug or am I missing something?
>>
>
> But if your --arguments script will return something starting with dash,
> fish have to complete it.
> Consider this example:
> complete -c foo -a '-opt1 -opt2'
So it is intentional then. How can I prevent this behaviour? I toyed with
__fish_contains_opt, but that is not optimal. I will try to parse
commandline --current-token but it gets too complicated, it defies the
simplicity of completions.
I noticed that in nearly *all* occasions the --arguments script is
executed, which is quite annoying if it takes long time just to complete
just a simple option.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users