Tmux plugin to open the last non-empty command output in a pager.
To install with tpm, add the following to your Tmux configuration file.
set -g @plugin 'mskelton/tmux-last'
A regex pattern to identify command separator. Required.
set -g @tmux-last-prompt-pattern '> '
The key that should be bound to open the last command output. Defaults to t
.
set -g @tmux-last-key t
The number of lines consumed by the prompt. If your prompt takes up two lines, you could set this to 2
. Defaults to 1
.
set -g @tmux-last-prompt-lines 1
The pager to use for the captured output. Defaults to $PAGER
.
set -g @tmux-last-pager 'less'
When enabled, enables colorized output by passing escape codes to the pager. To use this, you may need to update @tmux-last-pager
so your pager command accepts escape codes.
set -g @tmux-last-color on
set -g @tmux-last-pager 'less -r'