Terminal and pipes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Terminal and pipes

Lifepillar
How does one launch piped commands in Vim terminal?
The naïve:

     call term_start('ls | fzf')

does not work. I guess that I should connect two jobs using
out_io and in_io, but is that possible?

Thanks,
Life.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Terminal and pipes

Bram Moolenaar

Lifepillar wrote:

> How does one launch piped commands in Vim terminal?
> The naïve:
>
>      call term_start('ls | fzf')
>
> does not work. I guess that I should connect two jobs using
> out_io and in_io, but is that possible?

You need to do this with a shell:

        call term_start(['sh', '-c', 'ls | more'])

--
The difference between theory and practice, is that in theory, there
is no difference between theory and practice.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Terminal and pipes

Lifepillar
On 15/09/2017 20:43, Bram Moolenaar wrote:

>
> Lifepillar wrote:
>
>> How does one launch piped commands in Vim terminal?
>> The naïve:
>>
>>       call term_start('ls | fzf')
>>
>> does not work. I guess that I should connect two jobs using
>> out_io and in_io, but is that possible?
>
> You need to do this with a shell:
>
> call term_start(['sh', '-c', 'ls | more'])

Aaah, of course! Way too simple… :)

Thanks,
Life.


--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.