libtmux Reference MCP Search
On this page

client.Client.lock

View as Markdown

Module
client
Declared in
Client
Package
libtmux
Source
crates/libtmux/src/client.rs
lock ( self ) Result<(), Error>
method [source]
method [source]
lock

Lock this client's terminal.

Runs the lock-command option, which is lock -np unless the server was told otherwise. crate::Session::lock locks every client attached to one session and crate::Server::lock_all locks every client on the server; this locks exactly one.

tmux marks a locked client with the flag it uses for a suspended one, so a locked client leaves crate::Server::clients the same way and comes back when its lock-command exits. A server with lock-after-time set reaches that state with nobody asking.

Errors

Returns an error when tmux refuses the command. Reading through the handle while the client is locked gives Error::ClientSuspended , not Error::ObjectGone .

0 declared, 0 inherited

Esc

Type to search.