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

Python API

Python documentation

libtmux.Server.save_buffer

Python

View as Markdown

Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
Ruby Lua TypeScript Rust Go Java .NETC++Swift
save_buffer ( self , path : StrPath , buffer_name : str | None = None , append : bool | None = None ) → None
method [source]
method [source]
save_buffer

Save a paste buffer to a file via $ tmux save-buffer.

Parameters
  • path ( StrPath ) – File path to save the buffer to.

  • buffer_name ( str | None ) – Name of the buffer (-b flag). Defaults to the most recent.

  • append ( bool | None ) – Append to the file instead of overwriting (-a flag).

In other ports Write a paste buffer to a file

Examples

>>> import pathlib
>>> server.set_buffer('save_me')
>>> path = pathlib.Path(request.config.rootdir) / '..' / 'tmp_save.txt'
>>> server.save_buffer(str(path))
await server.saveBuffer("captured", "/tmp/build.log");

0 declared, 0 inherited

Esc

Type to search.