3 ms·
Using netcat you can get this send: ls | netcat 127.0.0.1 5555 receive: while :; do netcat -l 5555; done You could make it cleaner but that basic idea
by jahnu 11y ago
Using netcat you can get this
send:
ls | netcat 127.0.0.1 5555
receive:
while :; do netcat -l 5555; done
You could make it cleaner but that basic idea works
- kolme 11y agoI do something similar but with named pipes. I use it to dispatch commands from vim to another tmux pane (or screen, for that matter). https://gist.github.com/manuel-colmenero/94c53afbb3a167c6e769 https://gist.github.com/manuel-colmenero/94c53afbb3a167c6e76... recieve: ./vimfifo pipe send: echo 'ls' > pipe (note that the command is runned in the "recieving end", so that vim doesn't block)
- jmcphers 11y agoHave you seen dispatch.vim? It makes it easy to dispatch commands from Vim to a tmux split, etc. https://github.com/tpope/vim-dispatch https://github.com/tpope/vim-dispatch
- kolme 11y agoYes, and I also use it, but :Dispatch takes the output to the error list, and :Start doesn't display the output (ot waits for promt). With this script I can have the following layout: .-----------------. | | | | Vim | output | | | | | | | `-----------------' I usually do this when editing a script, for a quick edit-run feedback. For example: :update | RunFifo bash % Runs the script and displays the output on the side. And then for saving and re-running the same command is just: @: