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

Yank script doesn't work for me #6

Open
austinbutler opened this issue Jul 13, 2021 · 4 comments
Open

Yank script doesn't work for me #6

austinbutler opened this issue Jul 13, 2021 · 4 comments

Comments

@austinbutler
Copy link

austinbutler commented Jul 13, 2021

A modified version here does, though: https://github.com/JSteeleIR/dotfiles-public/blob/public/scripts/yank

I'm using Alacritty on a macOS host with tmux running locally and also remotely in a NixOS host.

Opening this issue since your blog seems like practically the source of truth on nested tmux copy/paste 😛 . Maybe there are some improvements worth pulling into your own yank script.

Testing by running echo "Testing" | ./yank.sh on the remote server, then pasting on the local host.

@sunaku
Copy link
Owner

sunaku commented Oct 24, 2022

Thanks for your feedback. I'll need to find a macOS host so I can try reproducing this issue. The script you linked to explicitly redirects the escape sequence to $SSH_TTY whereas mine doesn't (because technically, doing that should be redundant). Could you please check whether the latest (updated) version of my script still triggers the problem in your environment?

@austinbutler
Copy link
Author

Sorry, but I no longer have a Mac laptop for work so I can't test anything.

@JonathanWheeler
Copy link
Contributor

For others who may stumble across this, try adding the following to your .tmux.conf:

set-window-option -g allow-passthrough on

(Then reload your config with tmux source-file ~/.tmux.conf, or killing and restarting tmux with tmux kill-server; tmux.)

I've submitted pull request #8 to partially address this.

Alternatively, try commenting out this line in yank:
test -n "$TMUX" -o -z "${TERM##screen*}" && esc="\033Ptmux;\033$esc\033\\"

@sunaku
Copy link
Owner

sunaku commented Jun 24, 2023

Excellent! 👌 Great catch, thank you. 🙏 I'll adjust the documentation a bit and merge soon. 🤓

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

No branches or pull requests

3 participants