Chain two job_start()?

15 views
Skip to first unread message

RingoRangoRongo

unread,
Dec 14, 2021, 7:23:46 AM12/14/21
to vim_use
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
Reply all
Reply to author
Forward
0 new messages