Server.set_buffer
Put text in a named buffer, replacing what was there.
Source and package
- Qualified name
-
libtmux::Server:: set _buffer - Namespace
- libtmux
- Declared in
Server- Package
- libtmux-cxx
- Source
- include/libtmux/server.hpp
- Other languages
- Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGo Java C#Swift Kotlin Scala OCaml F# Clojure
- [[
C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] expected<void, CommandFailure > set_buffer(std::string name, std::_view string data) const;_view -
Description#
An empty name lets tmux choose one, which is what a caller copying without caring about the name wants.
- Parameters
tmux command#
The tmux commands behind set_buffer.
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 |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | server |
| Rust | server |
| Go | tmux |
| Java | no equivalent on Server |
| C# | Lib |
| Swift | Server |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | Lib Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes. |
No equivalent is recorded in PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.