6

I am using the following line in tmux for getting a "hardcopy" feature like in GNU Screen:

bind H capture-pane \; save-buffer -b 0 ~/tmux.hardcopy \; delete-buffer -b 0

However, the ANSI colors are not captured to the file. How do I make tmux save the ANSI escape sequences so that the hardcopy will be colored too?

Janus Troelsen
  • 1,463
  • 1
  • 15
  • 27

1 Answers1

9

tmux 1.8 added the -e option to capture-pane; using this new option causes the captured data to include the effective escape sequences.

bind H capture-pane -e \; save-buffer ~/tmux.hardcopy \; delete-buffer

(You can omit -b 0 since buffer 0 is the default buffer if one is not specified.)

Chris Johnsen
  • 19,790
  • 8
  • 63
  • 52