Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-cxx latest

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.Language documentation]] expected<void, CommandFailure> set_buffer(std::string_view name, std::string_view data) const;

Description#

An empty name lets tmux choose one, which is what a caller copying without caring about the name wants.

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

Equivalents of Put text into a paste buffer in other languages
Language Equivalent
Python libtmux.Server.set_buffer
Ruby LibTmux::Server#write_buffer
Lua libtmux.Server:set_buffer
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript server.Server.setBuffer
Rust server.Server.set_buffer
Go tmux.Server.SetBuffer
Java no equivalent on Server
C# LibTmux.TmuxBuffers.SetAsync
Swift Server.setBuffer(_:named:)
OCaml No direct public OCaml equivalent is recorded for this operation.
Perl LibTmux::Server::set_buffer 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#.

Esc

Type to search.

Reference previewOpen reference