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

server.Server.setBuffer

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
PythonRubyLuaRustGo Java .NETC++Swift
setBuffer ( name : : string , data : : string ) → Promise<void>
method [source]
method [source]
setBuffer

Put a string into a named paste buffer.

Empty data stores nothing. tmux exits zero for set-buffer -b name "" and creates no buffer at all, so the name a caller thinks they just wrote is absent — and they learn that from whatever reads it next, which points at the wrong call. Check before storing content that may be empty.

In other ports Put text into a paste buffer

Examples

await server.setBuffer("greeting", "hello");
>>> server.set_buffer('hello')
>>> server.show_buffer()
'hello'

0 declared, 0 inherited

Esc

Type to search.