# io.github.libtmux.kotlin.Shell.choose

- **Module:** io.github.libtmux.kotlin
- **Package:** io.github.libtmux:libtmux-kotlin
- **Language:** Kotlin
- **Kind:** method
- **Source:** https://libtmux.org/en/kotlin/latest/reference/sources/libtmux-kotlin/build/generated/sources/operations/kotlin/io/github/libtmux/kotlin/ShellOperations.kt
- **Page:** https://libtmux.org/en/kotlin/latest/reference/io-github-libtmux-kotlin-shell-choose/

```
public suspend fun Shell.choose(condition: String, whenTrue: String): Unit

public suspend fun Shell.choose(
  condition: String,
  whenTrue: String,
  whenFalse: String,
): Unit
```

Runs one tmux command when a shell command succeeds.

## Parameters

- `condition` (`String`)
- `whenTrue` (`String`)
- `whenFalse` (`String`) (for `choose(condition, whenTrue, whenFalse)`)
