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

Open one of tmux's interactive choosers on a client.

Source and package
Qualified name
libtmux::server::Server::choose
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server/interactive.rs
pub async fn choose( &self, chooser: Chooser, client: Option<&Client> ) -> Result<(), Error>

Description#

A chooser opens in a pane, which is why this needs no client and succeeds on a server nothing is attached to: the pane's pane_in_mode becomes 1 and its pane_mode becomes tree-mode, client or not.

That is the difference from Self::display_popup(), Self::display_menu(), Self::command_prompt() and Self::display_panes(), which draw on a client and report "no current client" without one. Passing client() here only says which client's current pane to open in.

Errors

Returns Error::ServerMismatch when the client belongs to another server, or an error when tmux refuses the command. A missing client is not one: this does not need one.

Parameters
Esc

Type to search.

Reference previewOpen reference