7

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?

1 Answer 1

10

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.)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.