MCPcopy
hub / github.com/codeaashu/claude-code / tmuxPassthrough

Function tmuxPassthrough

src/ink/termio/osc.ts:78–80  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

76 * ~/.tmux.conf; without it, tmux silently drops the whole DCS (no regression).
77 */
78function 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`.

Callers 1

setClipboardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected