What have folks done with iTerm's coprocess support?

353 views
Skip to first unread message

Richard Mitchell

unread,
Jul 17, 2016, 12:28:25 PM7/17/16
to iterm2-discuss
iTerm's coprocess feature looks really interesting, but I've yet to come up with anything either useful or just fun to do with it, which I blame more on my lack of imagination than anything else.

I did find someone had a github repo for coprocess code, but it hasn't seem to have anything beyond a remade file in the past 2 years.

So, what have folks done with it?  What ideas do people have for using it?

Richard

George Nachman

unread,
Jul 18, 2016, 6:13:45 PM7/18/16
to iterm2-...@googlegroups.com
Zmodem support is the most well-known use.  https://github.com/mmastrac/iterm2-zmodem


--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Greb

unread,
Jul 19, 2016, 7:46:06 AM7/19/16
to iterm2-...@googlegroups.com
On Sun, Jul 17, 2016 at 12:28 PM Richard Mitchell <rwmit...@gmail.com> wrote:
So, what have folks done with it?  What ideas do people have for using it?

The web stack at work preloads all of the code/libraries before forking off workers.  Once it completes the preload it prints some info like, number of modules loaded, total ram consumed, amount of time it took to preload.

I have a coprocess triggered by a regex in the profile used for my dev server that logs this information with a timestamp locally.  Gives me a nice fully automated historical record with very little set up.

Sure you could just have the spot that prints this info out log it to a file but then it wouldn't be local and I'd have to worry about backing it up when I want to re-image the dev server. Plus, I wouldn't get to play with coprocesses.

Richard Mitchell

unread,
Jul 19, 2016, 9:45:13 PM7/19/16
to iterm2-discuss
So there's 2 ways to run a co-process.  The first way is that it runs all the time, which means that most likely the co-process will be doing  a regex on the data stream and then doing based on that.

The second is to use a trigger, which does a regex on the data stream, and then invokes a specific co-process on the the matched regex line.

ie: in short, the difference is where the regex is getting run, with the first potentially allowing more involved regex matching.  right?

Your solution is a great way to add information on an output stream that you otherwise don't have any control over.
Message has been deleted

Jason Solgat

unread,
Jul 20, 2016, 1:59:02 PM7/20/16
to iterm2-discuss
Do you happen to know how to get the profile, info, and close icons back to the top of the window.  I just upgraded and the icons are no longer in the window.

Richard Mitchell

unread,
Jul 23, 2016, 1:05:29 AM7/23/16
to iterm2-discuss
Has anyone implemented a chatbot using a coprocess?

I can't imagine it would be useful, more as an amusing distraction.
Reply all
Reply to author
Forward
0 new messages