Search code examples
sshtmuxgnu-screenttyiterm

Leaving tmux scrollback in terminal (iTerm2)


Usually tmux will only show as much output as however many rows my terminal currently displays. And then when I detach it, it clears all of its content. I know how to look at scrollback (ctrl+A, [, k, ...), but how can I configure tmux to just print all its output to terminal, as if I wasn't using it at all?

I like tmux because I'm awful at remembering to nohup certain tasks, and because it makes viewing the output of long-running jobs easier. But I would like to be able to view its scrollback more naturally, by simply scrolling back in iTerm2.

Alternatively, if there's a way to do this in screen, I can use that too.


Solution

  • iTerm2 build 1.0.0.20130302 has an preference which enables it to capture scrollback even when a so-called hard status line is present:

    iTerm2 preferences pane

    Works for me, tested with tmux v1.8.