Shell.choose
Runs one tmux command when a shell command succeeds.
Source and package
- Qualified name
-
io.github .libtmux .Shell. choose - Package
- io.github.libtmux
- Declared in
Shell- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/Shell.java
-
- Parameters
-
-
condition(String) – a shell command, judged by its exit status forchoose(condition, whenTrue) -
whenTrue(String) – the tmux command to run when the condition succeeds forchoose(condition, whenTrue) -
condition(String) forchoose(condition, whenTrue, whenFalse) -
whenTrue(String) forchoose(condition, whenTrue, whenFalse) -
whenFalse(String) – the tmux command to run when the condition does not succeed forchoose(condition, whenTrue, whenFalse)
-
Recorded calls
source callsThe Java reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls io.github.libtmux.Shell.choose.
tmux command
task materialThe tmux commands behind choose.
tmux C API
task materialThe C declarations in tmux that implement these commands.
In other ports
task equivalence 5 other ports mappedSource-verified mappings for Run one tmux command or another, on a shell test. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from Java |
|---|---|---|
| Java | io Runs one tmux command when a shell command succeeds. | This page |
| Python | libtmux Execute a tmux command conditionally via $ tmux if-shell. | on Server |
| TypeScript | server Run one command or another depending on a condition. | on Server |
| Go | tmux IfShell executes ThenCommand when ShellCommand succeeds and ElseCommand, if present, when it fails. A completed stderr result is an error; cancellation can interrupt delivery without proving that tmux did not execute a branch. | on Server |
| C# | Lib Runs one tmux command or another depending on a shell command. | on Server |
| Raku | Lib Execute one of two bounded commands after a shell test, or an explicit FORMAT condition. | on Server Branches use bounded Invocation values; the condition explicitly selects shell or FORMAT semantics. |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
no equivalent on Server
no equivalent on Server
no equivalent on Server
No direct public OCaml equivalent is recorded for this operation.
No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.