MCPcopy Create free account
hub / github.com/Noumena-Network/code / wrapForMultiplexer

Function wrapForMultiplexer

src/ink/termio/osc.ts:36–45  ·  view source on GitHub ↗
(sequence: string)

Source from the content-addressed store, hash-verified

34 * wrapped \x07 is opaque DCS payload and tmux never sees the bell.
35 */
36export function wrapForMultiplexer(sequence: string): string {
37 if (process.env['TMUX']) {
38 const escaped = sequence.replaceAll('\x1b', '\x1b\x1b')
39 return `\x1bPtmux;${escaped}\x1b\\`
40 }
41 if (process.env['STY']) {
42 return `\x1bP${sequence}\x1b\\`
43 }
44 return sequence
45}
46
47/**
48 * Which path setClipboard() will take, based on env state. Synchronous so

Callers 4

cleanupTerminalModesFunction · 0.85
unmountMethod · 0.85
useTerminalNotificationFunction · 0.85
useTabStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected