Tmux could be seen as an example of "terminal middleware" but I mean a more general solution.
Imagine you had a framework that lets you write scripts to intercept and modify I/O from programs running in a shell. You could have password managers that automatically (or semi-automatically) answer sudo prompts. Or filters that censor certain strings (if you're live streaming coding sessions this could be very useful) before they appear on screen.
Another useful "terminal middleware" layer could be pre-processing commands before (or after) the shell parses them. You could wrap every command in a `script -c` invocation in order to capture the output so that you can later re-use it without having to redo the processing. (This is probably my biggest pet peeve with Un*x since it really adds up over time.)
There's a spectrum of these. There's terminals that have their own modes, like Termite. There's also terminals that have their own scripting/extension frameworks, like hyper.js or secureCRT.
My personal favorite is Emacs. It's the only environment I've ever been able to rig up that's truly, fully hackable. Since terminal output is treated like any other text buffer, I can roll just about any package I like on top without issue.
In particular, this solved my ssh woes. There's no need to reconfigure my terminal dozens of times each day, because all my preferences and tweaks exist on a higher layer.
t0astbread|6 years ago
Imagine you had a framework that lets you write scripts to intercept and modify I/O from programs running in a shell. You could have password managers that automatically (or semi-automatically) answer sudo prompts. Or filters that censor certain strings (if you're live streaming coding sessions this could be very useful) before they appear on screen.
Another useful "terminal middleware" layer could be pre-processing commands before (or after) the shell parses them. You could wrap every command in a `script -c` invocation in order to capture the output so that you can later re-use it without having to redo the processing. (This is probably my biggest pet peeve with Un*x since it really adds up over time.)
chaorace|6 years ago
My personal favorite is Emacs. It's the only environment I've ever been able to rig up that's truly, fully hackable. Since terminal output is treated like any other text buffer, I can roll just about any package I like on top without issue.
In particular, this solved my ssh woes. There's no need to reconfigure my terminal dozens of times each day, because all my preferences and tweaks exist on a higher layer.