Tuesday, December 14, 2021

Chain two job_start()?

Hi!

Is it possible to pass the results from one job to another?

Like, if i have to 'ls -la ~ | grep vim', and don't want to invoke shell with 'sh -c "exec ls -la ~ | grep vim"' -- then, I'd define jobs like this:

let com1 = ["ls", "-la", expand("~/")]
let com2 = ["grep", "vimrc"]

Can start the first one like this:

let job = job_start(com1, {"out_cb": "Handler", "err_cb" : "ErrHandler"})

And what's next? How do I connect the second job and how do I define Handler() in this case? :)


Thanks

--
RRR

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/d2160d9a-0f30-42ff-b18e-b6197090a4a1n%40googlegroups.com.

No comments:

Post a Comment