Hacker News new | ask | show | jobs
by vptr 1898 days ago
I think a more killer feature of tmux is that you can send keystrokes to apps running inside tmux (with send-keys). It just opens a door for scripting CLI apps that otherwise would not be scriptable. e.g. irc clients and similar full screen apps.
4 comments

Yep. This is a killer feature for me. I have a ton of scripts that open new split screens and ssh into things to tail logs or others that ssh, change users, start some other console/repl/shell, then run a few commands in that. I'm sure there's better ways to do it but it's been enough to speed up a lot of the simple repetitive things for me.
To add to this, I have used tmux for automated testing of full-screen interactive command-line apps. It comes out like PhantomJS: send-keys + capture-pane is pretty awesome (once you overcome dumb timing stuff).
That's sick and good to know. I can use that on my current project.
You might want to look into expect(1).