#!/bin/bash file=$(mktemp) tmux capture-pane -pS -32768 >$file tmux new-window -n:scrollback-edit "n $file"