3 ms·
Unfortunately, I don't see a way around it. There's no other way to capture the output buffer.
by jshobrook 2y ago
Unfortunately, I don't see a way around it. There's no other way to capture the output buffer.
- jas39 2y agoOf course there is; tmux does it. Try redirecting the file descriptor so that you can capture stdout. For bash, something like: 'exec > >(tee -a "$LOG_FILE") 2>&1'. This could be injected in .bashrc, and activated by default or by a bash function. The >(...) syntax is called process substitution.