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 latest

Server.show_messages

Show server message log via $ tmux show-messages.

Source and package
Qualified name
libtmux.Server.show_messages
Module
libtmux
Declared in
Server
Package
libtmux
Source
src/libtmux/server.py
Other languages
Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Ruby Lua TypeScript Rust GoJavaC# C++ Swift Kotlin Scala OCaml F# Clojure
show_messages ( self, target_client: str | None = None, terminals: bool | None = None, jobs: bool | None = None, ) → list[str]

Description#

Without -T/-J, tmux resolves the message log against a target client; if no client is attached and target_client is omitted, tmux raises no current client. Provide target_client (e.g. via ControlMode) when running headless, or use terminals/jobs — those modes don't require a client.

Examples#

>>> with control_mode() as ctl:
... result = server.show_messages(target_client=ctl.client_name)
>>> isinstance(result, list)
True
Parameters
  • target_client (str | None) # – Target client (-t flag).

  • terminals (bool | None) # – List terminal capabilities and flags instead of the message log (-T flag).

  • jobs (bool | None) # – Print the tmux job server summary instead of the message log (-J flag).

Returns

list[str] Server message log lines (or terminal/job summary when terminals/jobs is set).

tmux command#

The tmux commands behind show_messages.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Read the server's message log

Equivalents of Read the server's message log in other languages
Language Equivalent
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript no equivalent on Server
Rust no equivalent on Server
Go tmux.Server.ShowMessages
Java io.github.libtmux.MessageLog.lines
C# LibTmux.Server.GetMessagesAsync
C++ Server::show_message posts a message rather than reading the log
Swift no equivalent on Server
OCaml No direct public OCaml equivalent is recorded for this operation.
Perl No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference