In your .tmux.conf
file you can set the window history with something like:
set -g history-limit 4096
Is there a way to set an unlimited history for each window?
In your .tmux.conf
file you can set the window history with something like:
set -g history-limit 4096
Is there a way to set an unlimited history for each window?
Do NOT set it to something like:
set -g history-limit 999999999
This will pre-allocate that many lines (and hence memory) for all windows, which is going to cripple your machine the more history is stored over time.
Set it to something large, by all means but not THIS large.
From what I can tell, you can only do this in a "practical" fashion, by setting the history to an absurdly large number. e.g.:
set -g history-limit 999999999
UPDATE: see the other answer as to why you don't want to use a number this high. Something more reasonable (less 9's) would be best.
UPDATE again: perhaps pre-allocation doesn't occur. @Volker Siegel's comment on the other answer indicates that setting the value does not cause memory allocation.
An alternative is to have a reasonably big history and install the tmux logging plugin
I like to have logging in all tmux windows turned on by default. I log to a 'tmux_log' directory and have a cron job to delete very old logs.
If you're worried about your memory exploding and only care about a temporary solution (like one noisy pane), you can just set the value in your tmux prompt. (assuming you have you prefix set to the <Ctrl+B> default)
<Ctrl+B>:
Then you'll see a prompt at the bottom of the screen where you can type:
set history-limit 9999999
or whatever limit you want and then press enter.
This lasts for the whole tmux session, in all panes and windows, but won't be persisted in the config and is easily reset in the same way it was set.
tmux
commands like these on the command line, eg tmux set history-limit 9999