Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

server.Server.loadBuffer

TypeScript

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
Python Ruby Lua Rust Go Java .NETC++Swift
loadBuffer ( name : : string , data : : string | Uint8Array ) → Promise<void>
method [source]
method [source]
loadBuffer

Fill a paste buffer from data fed through tmux's stdin.

Use this over Server.setBuffer for anything large or binary: that one passes its data as a command-line argument, and this one does not.

In other ports Fill a paste buffer from a file

Examples

await server.loadBuffer("payload", new Uint8Array([0x68, 0x69]));
>>> import pathlib
>>> path = pathlib.Path(request.config.rootdir) / '..' / 'tmp_load.txt'
>>> _ = path.write_text('loaded')
>>> server.load_buffer(str(path), buffer_name='loaded_buf')

0 declared, 0 inherited

Esc

Type to search.