home
home copied to clipboard
Yank script doesn't work for me
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.
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?
Sorry, but I no longer have a Mac laptop for work so I can't test anything.
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\\"
Excellent! :ok_hand: Great catch, thank you. :pray: I'll adjust the documentation a bit and merge soon. :nerd_face: