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

Re: How to get all tagets for rake completion?



> On 15 December 2020 at 12:57 Jörg Sommer <joerg@xxxxxxxx> wrote:
> I would like to get all targets for the completion of rake arguments. How
> can I inject an argument to the targets query call or how to replace it? I
> have to pass `-A` to *rake* to get the arguments for the completion.

Frankly, your best bet is probably just to copy the distributed _rake
function and adapt it, copying it to somewhere early in your $fpath.
You'll see towards the end an extremely complicated line with "-sT" in
the middle --- just change that to "-sTA".

I have a feeling it might be possible to set a style so that the
_call_program helper does something different for you, but I'm not
sure there's any benefit in being too clever here.  The _rake completer
doesn't change very often, I don't think.

(This could be made a style for the _rake completer easily enough,
in fact.)

pws




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