Comment by blueflow
1 day ago
> So it’s like Playwright/Puppeteer for the terminal
I mean, a tty is just a file descriptor... there have been script(1), expect(1) and chat(8) since the 80ies. tmux is not really necessary.
1 day ago
> So it’s like Playwright/Puppeteer for the terminal
I mean, a tty is just a file descriptor... there have been script(1), expect(1) and chat(8) since the 80ies. tmux is not really necessary.
"tmux capture-pane" strips escape sequences that break the terminal and sets all the right variables; try using expect with e.g. neovim
I did use a shell script and script(1) to automate vi. Don't see the issue?
You right, it's pseudo terminal needed. The module pty of python can do this
And screen(1) https://linux.die.net/man/1/screen
Don't forget tmux(1) https://github.com/tmux/tmux/wiki
er, the context in this subthread is tmux alternatives
3 replies →
These are all great. If you need to do something more involved, pexpect is also worth mentioning. It's a reimplementation of expect in python that's easy to be productive with quickly.
I used it in a previous job to automate configuring thousands of network devices