* Wrap a payload in tmux's DCS passthrough: ESC P tmux ; ESC \ * tmux forwards the payload to the outer terminal, bypassing its own parser. * Inner ESCs must be doubled. Requires `set -g allow-passthrough on` in * ~/.tmux.conf; without it, tmux silently drops the whole DCS (no regressio
(payload: string)
| 76 | * ~/.tmux.conf; without it, tmux silently drops the whole DCS (no regression). |
| 77 | */ |
| 78 | function tmuxPassthrough(payload: string): string { |
| 79 | return `${ESC}Ptmux;${payload.replaceAll(ESC, ESC + ESC)}${ST}` |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Load text into tmux's paste buffer via `tmux load-buffer`. |