Is it possible to programmatically read terminal contents from OSX terminal without tmux?

67 Views Asked by At

If a shell is running inside tmux, I can run tmux capture-pane to capture exactly what the user sees as a string.

If a shell is running in the naked OSX terminal, I can run tty and get an output of /dev/ttys000. However, if I simply cat /dev/ttys000 in a different terminal, it does not give me what the user sees.

Is there some programmatic way (e.g. set of system calls) to access what the user sees in a non-tmux shell?

0

There are 0 best solutions below