window.Window.cmd
TypeScript
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript
- Rust
- Go
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- packages/libtmux/src/window.ts
- Other languages
- Python Ruby Lua RustGo Java .NET C++ Swift
-
Run a tmux command this package does not model, addressed at this window.
The window's id is sent as the target; pass
targetto address something else, ornullfor a command that takes none —display-panestakes a client, so it wants{ target: null }and not this window's@n.In other ports Run a tmux command addressed at a window
- Python
libtmux.Window.cmd - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua No source-verified Lua equivalent is recorded for this operation.
- Rust
window.Window.cmd - Go
tmux.Window.Cmd - Java no equivalent on
Window - .NET no equivalent on
Window - C++ no equivalent on
Window - Swift no equivalent on
Window
- Python
Examples
await window.cmd("rotate-window");Create a pane from a window:
>>> window.cmd('split-window', '-P', '-F#{pane_id}').stdout[0]'%...' Magic, directly to a Pane :
>>> Pane.from_pane_id(pane_id=session.cmd(... 'split-window', '-P', '-F#{pane_id}').stdout[0], server=session.server)Pane(%... Window(@... ...:..., Session($1 libtmux_...)))let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("raw").await?;let window = session.active_window().await?.expect("a window");
let result = window .cmd(libtmux::Command::new("display-message").arg("-p").arg("#{window_id}")) .await?;assert_eq!(result.stdout_lossy().trim(), window.id().to_string());
guard.shutdown().await?;0 declared, 0 inherited