Capture the output of the last terminal command and open copy it to clipboard.
Go to file
Sayantan Santra 2c8eb5b066 Updated LICENSE 2023-04-10 20:07:33 -05:00
LICENSE Updated LICENSE 2023-04-10 20:07:33 -05:00
README.md Updated README.md 2022-08-17 17:10:19 -05:00
plugin.sh Bug fixing 2022-08-17 12:37:26 -05:00
tmux_copy_last_command_output.tmux Bug fixing 2022-08-17 12:45:15 -05:00

README.md

Tmux Copy Last Command Output

Capture the output of the last terminal command and copy it to clipboard.

Installation

Using TPM:

set -g @plugin 'SinTan1729/tmux_copy_last_command_output'

Hit prefix + I to fetch and source the plugin.

Manual

Clone the repo:

git clone https://github.com/SinTan1729/tmux_copy_last_command_output.git ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/plugins/tmux_copy_last_command_output

Source it in your .tmux.conf (or $XDG_CONFIG_HOME/tmux/tmux.conf):

run-shell ${XDG_CONFIG_HOME:-$HOME/.config}/tmux/plugins/tmux_copy_last_command_output/tmux_copy_last_command_output.tmux

Reload TMUX conf by running:

tmux source-file $XDG_CONFIG_HOME/tmux/tmux.conf

Configuration

@command-copy-key

Required. Set Prefix + key to trigger the plugin. For example, prefix+g:

set -g @command-copy-key g

@command-copy-prompt-pattern

Required. A regexp to identify command separator. Usually a prompt. E.g., if set to ' ) ', the plugin will capture the latest output up until the first line that contains ' ) ':

set -g @command-copy-prompt-pattern ' ) '