Closed hegga closed 2 years ago
Thanks for looking into this.
I can't merge it as it is because
-w
requires tmux 3.2 so not everyone may have itosc52
is already used by the example in the wiki - so if we change this we might break some setupsCould you use the clip_tool_run
parameter like this?
copy() {
if [[ "$clip_tool_run" == "fg" ]]; then
# run in foreground as OSC-52 copying won't work otherwise
tmux set-buffer -- "$1"
tmux run-shell "tmux show-buffer|$clip_tool"
elif [[ "$clip_tool_run" == "osc-52" ]]; then
# use tmux OSC 52 copy
tmux set-buffer -w -- "$1"
else
# run in background as xclip won't work otherwise
tmux set-buffer -- "$1"
tmux run-shell -b "tmux show-buffer|$clip_tool"
fi
}
Sure, @laktak! I've updated the PR accordingly.
This uses the
-w
option for theset-buffer
command which implements OSC 52 support. This fixes my issue in #92.