Server.ifShell
Run one command or another depending on a condition.
Source and package
-
Examples#
await server.ifShell("test -d /tmp", "display-message 'present'");
tmux command#
The tmux commands behind ifShell.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Run one tmux command or another, on a shell test
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Rust | no equivalent on Server |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | no equivalent on Server |
| Swift | no equivalent on Server |
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.