Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux 3.4 copy not working #15

Open
eeweegh opened this issue Dec 10, 2024 · 3 comments · May be fixed by #16
Open

tmux 3.4 copy not working #15

eeweegh opened this issue Dec 10, 2024 · 3 comments · May be fixed by #16

Comments

@eeweegh
Copy link

eeweegh commented Dec 10, 2024

Hi there!

I am running WSL2 Ubuntu 24.04 LTS, which comes with tmux 3.4, and while 'osc copy' worked fine outside of tmux (straight wsltty shell), it would not work inside tmux, even though I set the correct options:

set -g set-clipboard on
set -g allow-passthrough all

(btw, osc paste did work fine, both outside and within tmux)

I managed to work around this, by just making osc believe it was NOT within TMUX (what brought me to do that was the vim-oscyank code, which did not bother with the tmux passthrough escape, worked fine).
image

Let me know if you need extra information!

@theimpostor
Copy link
Owner

This seems to be working for me with tmux 3.5a. On mac with Alacritty, with no tmux options configured:

❯ tmux -V
tmux 3.5a

❯ echo -n asdf | osc copy
2025/01/20 15:19:36 ERROR tmux allow-passthrough must be set to 'on' or 'all'
tmux allow-passthrough must be set to 'on' or 'all'

❯ tmux set -w allow-passthrough all

❯ echo -n asdf | osc copy
# no error, clipboard contains 'asdf'

Does it behave differently if you do tmux set -w allow-passthrough all instead of set -g ...?

Also it appears that if set-clipboard is set to on (and not external), if osc outputs an osc52 copy sequence without the passthrough (i.e. TMUX='' osc copy ...), tmux sets it's own internal clipboard but then copies it to the system clipboard by using it's own osc52 sequence to the parent terminal. So it might be that if set-clipboard is set to on we don't need to use the passthrough sequence.

@mhanberg
Copy link

I am on tmux 3.5a and it doesnt seem to work with tmux set -g allow-passthrough on, or all

i also have tmux set -s set-clipboard on

@mhanberg
Copy link

It looks like tmux show -v <option name> will show sessions options, which it seems to include window options. If you want to see a global option, you have to use -gv

@mhanberg mhanberg linked a pull request Feb 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants