Core Library0.xAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

method libtmux-java

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 for choose(condition, whenTrue)

  • whenTrue (String) – the tmux command to run when the condition succeeds for choose(condition, whenTrue)

  • condition (String) for choose(condition, whenTrue, whenFalse)

  • whenTrue (String) for choose(condition, whenTrue, whenFalse)

  • whenFalse (String) – the tmux command to run when the condition does not succeed for choose(condition, whenTrue, whenFalse)

Recorded calls

source calls
No call edges in the Java model.

The 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 material

The tmux commands behind choose.

tmux C API

task material

The C declarations in tmux that implement these commands.

In other ports

task equivalence 5 other ports mapped

Source-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.

Run one tmux command or another, on a shell test in each port
PortAPIDiffers from Java
Java io.github.libtmux.Shell.choose
Runs one tmux command when a shell command succeeds.
This page
Python libtmux.Server.if_shell
Execute a tmux command conditionally via $ tmux if-shell.
on Server
TypeScript server.Server.ifShell
Run one command or another depending on a condition.
on Server
Go tmux.Server.IfShell
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# LibTmux.Server.IfShellAsync
Runs one tmux command or another depending on a shell command.
on Server
Raku LibTmux::Server.if-shell
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 Haskell equivalent.

No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.

No Rust equivalent.

no equivalent on Server

No C++ equivalent.

no equivalent on Server

No Swift equivalent.

no equivalent on Server

No OCaml equivalent.

No direct public OCaml equivalent is recorded for this operation.

No Perl equivalent.

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#.

Esc
Search in

Type to search.

Reference previewOpen reference