session.Session.lock
- Module
- session
- Declared in
- Session
- Package
- libtmux
- Source
- crates/libtmux/src/session.rs
- Other languages
- Python Ruby Lua TypeScript Go Java .NET C++ Swift
-
Lock every client attached to this session.
tmux runs the
lock-commandto lock, so what a locked client shows is that command's business rather than this one's.Errors
Returns an error when tmux cannot be reached or refuses the lock.
Examples
let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("locked").await?;// Locking a session nobody is attached to is accepted and does nothing.session.lock().await?;guard.shutdown().await?;In other ports Lock every client attached to a session
- Python
libtmux.Session.lock_session - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua No source-verified Lua equivalent is recorded for this operation.
- TypeScript no equivalent on
Session - Go
tmux.Session.Lock - Java no equivalent on
Session - .NET
LibTmux.Session.LockAsync - C++ no equivalent on
Session - Swift no equivalent on
Session
- Python
0 declared, 0 inherited