libtmux Reference MCP Search
On this page

io.github.libtmux.Server.Server.ifShell

View as Markdown

Module
io.github.libtmux.Server
Declared in
Server
Package
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/Server.java
ifShell ( condition : String , whenTrue : String ) void ( condition : String , whenTrue : String , whenFalse : String ) void
methodoverload2 overloads [source]
methodoverload2 overloads [source]
ifShell

Runs one tmux command or another, according to whether a shell command succeeds.

<p>The choosing happens inside tmux rather than here, which is the point: the condition and both outcomes go out as one request, so nothing can change between asking and acting.

Parameters
  • condition ( String ) – a shell command, judged by its exit status

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

  • whenFalse ( String ) – the tmux command to run when it does not

0 declared, 0 inherited

Esc

Type to search.