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

Function tmuxLoadBuffer

src/ink/termio/osc.ts:90–102  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

88 * Returns true if the buffer was loaded successfully.
89 */
90export async function tmuxLoadBuffer(text: string): Promise<boolean> {
91 if (!process.env['TMUX']) return false
92 const args =
93 process.env['LC_TERMINAL'] === 'iTerm2'
94 ? ['load-buffer', '-']
95 : ['load-buffer', '-w', '-']
96 const { code } = await execFileNoThrow('tmux', args, {
97 input: text,
98 useCwd: false,
99 timeout: 2000,
100 })
101 return code === 0
102}
103
104/**
105 * OSC 52 clipboard write: ESC ] 52 ; c ; <base64> BEL/ST

Callers 1

setClipboardFunction · 0.85

Calls 1

execFileNoThrowFunction · 0.85

Tested by

no test coverage detected