Hi No, it needs to be encoded somehow in case the copied text contains control characters. If you are sure it won't you could modify tmux to skip the base64 (look for b64_ntop in tty_set_selection)
You will never get control characters by copying using copy mode except for newline, so I don't know what you mean when you say "tmux filters out the escape characters". You can send to the terminal directly using the passthrough escape sequence (see the FAQ). On Wed, 7 Jun 2023 at 13:22, Michael Grant <michael.gr...@gmail.com> wrote: > I didn't want to hijack Eric's other thread which is clearly X based so > starting a new thread here. > > I'm using Windows. I ssh into my linux servers with KiTTY and run tmux on > the linux server. No, I do not want to install an X server on windows, > thanks very much, > > KiTTY (a windows program which is a fork of PuTTY) not to be confused with > kitty, a terminal emulator that runs under linux. It seems the linux kitty > supports OSC52 by the way. > > I don't think KiTTY supports OSC52 (yet), at least, I've never gotten it > to work. But it does support taking the output to the printer and putting > that into the local clipboard: > http://www.9bis.net/kitty/index.html#!pages/StdoutToClipboard.md > > Try 1, I added this to my .tmux.conf: > > bind -Tcopy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel '~/bin/wcl' > > Unfortunately, tmux filters out the escape characters, the raw output is > not getting to KiTTY. > > I've tried pipping something to wcl outside tmux (as in, before starting > tmux) and it does work, i can paste on the windows side. > > First thought, is there some tmux command I can run which will echo > something back to the raw terminal (KiTTY in my case)? > > Second thought was maybe I could craft an Ms entry for a terminfo > override. This is what I tried: > > Try 2, added this to my .tmux.conf instead: > > set -as terminal-overrides ',*-256color:Ms=\E[5i;%p2%s;\E[4i' > > Restarted tmux (killed the server and restarted it). And it's > tantelizingly close. I get base64 text on the windows side! > > One difference between OSC52 and this KiTTY hack is that OSC52 expects the > string to be base64 encoded whereas printing to the printer doesn't expect > that. Is there some param that sends the raw text, not base64 encoded? > > Second, with this method, how can set the behavior to do the copy when I > release the mouse button? (MouseDragEnd1Pane) > > Michael Grant > > -- > You received this message because you are subscribed to the Google Groups > "tmux-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tmux-users+unsubscr...@googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/tmux-users/70847815-9ce9-4940-8815-1518690d52ban%40googlegroups.com > <https://groups.google.com/d/msgid/tmux-users/70847815-9ce9-4940-8815-1518690d52ban%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "tmux-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+unsubscr...@googlegroups.com. To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/CAEdLfcEMmagxzmXaWuGZ6cccKjQcg0BAfs_860wM-LnCsbXF7g%40mail.gmail.com.