tmux-copy-output
is a tmux plugin for copying command's outputs inside a pane.
- Launcher: Make sure you have a launcher or finder to be able to select:
xclip
Via TPM (Recommend)
Add this line to your tmux config file, then hit prefix + I
:
set -g @plugin 'jhonrocha/tmux-copy-output'
Clone this repo somewhere and source tmux-copy-output.tmux
at the config file.
The default key-binding is g
(of course prefix hit is needed), it can be modified by setting value to @tco-key
at tmux config file.
There is also an option to set which launcher to use. By default it is fzf-tmux
, you can use dmenu
or any custom command.
The default copy to clipboard command is xclip
for Linux systems. It's possible to override the command with @tco-copy
.
There is also a quick key to copy the last command executed on the pane, being G
by default. It is possible to override it with @tco-quick-key
.
set -g @tco-key 'k'
set -g @tco-launcher 'dmenu -c -l 30 -bw 2'
set -g @tco-copy 'pbcopy'
set -g @tco-quick-key 'K'
Copy script hugely inspired on:
- tmux-fzf-url plugin
Luke Smith
script to copy from external pipe on st