Server.setBuffer
Put a string into a named paste buffer.
Source and package
-
Description#
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.Examples#
await server.setBuffer("greeting", "hello");
tmux command#
The tmux commands behind setBuffer.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Put text into a paste buffer
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Rust | server |
| Go | tmux |
| Java | no equivalent on Server |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
No equivalent is recorded in PowerShell, Julia, Elixir, Kotlin, Scala or F#.