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.display_menu

Show a menu over a client.

Source and package
Qualified name
libtmux::server::Server::display_menu
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server/interactive.rs
Other languages
Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScript Go Java C# C++ Swift Kotlin Scala OCaml F# Clojure
pub async fn display_menu( &self, client: Option<&Client>, title: &str, items: impl IntoIterator<Item = MenuItem>, ) -> Result<(), Error>

Description#

Items appear in the order given. This needs a client with a terminal.

Like Self::command_prompt(), this waits for the person: tmux holds the invocation until an item is chosen or the menu is dismissed, and the dispatch timeout is what ends the wait when nobody does.

Errors

Returns Error::ServerMismatch when the client belongs to another server, or an error when no suitable client exists, when tmux refuses an item, and when the dispatch timeout expires before anyone chooses.

Parameters

tmux command#

The tmux commands behind display_menu.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Show a menu over a client

Equivalents of Show a menu over a client in other languages
Language Equivalent
Python libtmux.Server.display_menu
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript no equivalent on Server
Go tmux.Server.DisplayMenu
Java no equivalent on Server
C# no equivalent on Server
C++ no equivalent on Server
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