Core Library0.xAPI 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-rs latest

Server.load_buffer

Fill a paste buffer from a file, letting tmux read it.

Source and package
Qualified name
libtmux::server::Server::load_buffer
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server.rs
pub async fn load_buffer( &self, name: Option<&str>, path: impl AsRef<Path>, ) -> Result<(), Error>

Description#

Self::set_buffer() carries the data as a command argument, which the kernel caps: on Linux a single argument stops at MAX_ARG_STRLEN, 128 KiB, and a larger one fails with "argument list too long" before tmux sees it. tmux opens the file itself here, so size is the file system's problem rather than the command line's.

path is tmux's to resolve, and tmux reads it as the user running the server, which is not necessarily this process.

Errors

Returns an error when tmux cannot read the path.

Parameters

tmux command#

The tmux commands behind load_buffer.

tmux C API#

The C declarations in tmux that implement these commands.

Esc

Type to search.

Reference previewOpen reference