server.Server.ifShell
TypeScript
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript
- Rust Unavailable
- Go
- Java
- .NET
- C++ Unavailable
- Swift Unavailable
- Module
- server
- Declared in
- Server
- Package
- libtmux
- Source
- packages/libtmux/src/server.ts
- Other languages
- Python Ruby Lua Rust GoJava.NET C++ Swift
- ifShell ( condition : : string , command : : string , options : : IfShellOptions ) Promise<void>
-
Run one command or another depending on a condition.
In other ports Run one tmux command or another, on a shell test
- Python
libtmux.Server.if_shell - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua No source-verified Lua equivalent is recorded for this operation.
- Rust no equivalent on
Server - Go
tmux.Server.IfShell - Java
io.github.libtmux.Server.Server.ifShell - .NET
LibTmux.Server.IfShellAsync - C++ no equivalent on
Server - Swift no equivalent on
Server
- Python
Examples
await server.ifShell("test -d /tmp", "display-message 'present'");>>> server.if_shell('true', 'set -g @if_test yes')>>> server.cmd('show-options', '-gv', '@if_test').stdout[0]'yes'0 declared, 0 inherited