> 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.
You can try this:
complete -c foo -n "not expr match (commandline -t) '^-.*' >
/dev/null" -a '(sleep 2; echo aaa)'
the '-n' condition is cached. So as soon as you will use the same
condition for all completions it is not going to be slow.
Maxim
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users