Skip to content

Tag: tmux

tmux save scrollback to a file

Before each command, run the prefix (default Ctrl+B).

:capture-pane -pane -S -3000
:save-buffer buffer.txt

This will write all scrollback from that pane to a file ~/buffer.txt.

Tmux: keep same directory in new windows

# open/split windows in the same dir
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"

In your ~/.tmux.conf.

To source it in your open tmux:
[bash]
:source-file ~/.tmux.conf
[/bash]

Or in any shell:
[bash]
tmux source-file ~/.tmux.conf
[/bash]