Server.RunShellAsync
Runs a shell command and reports what it printed.
Source and package
- Qualified name
-
LibTmux .Server. Run Shell Async - Namespace
- LibTmux
- Declared in
Server- Package
- LibTmux
- Source
- src/LibTmux/Server.Execution.cs
- async Task<IRead
Only <string>?> RunShellAsync( RunList Shell request, CancellationRequest Token cancellationToken = default ) -
Description
The directory flag arrived in tmux 3.4, the error-output flag in 3.6, and passing arguments without a shell in 3.7. A foreground request that names no pane needs tmux 3.5: on 3.3a and 3.4 the shell's text goes to a pane in view mode and cannot be returned.
- Parameters
-
-
request(RunShell ) – What to run, and how.Request -
cancellationToken(CancellationToken ) – Cancels waiting for tmux's reply. tmux itself is not told: the server, not this process, ownsrun-shell's spawned command, so cancelling stops this call from waiting on it, not the command from running. Nor does stopping the whole server:KillAsync()does not reap arun-shellchild either, so it keeps running as its own orphaned process.Default
default
-
- Returns
-
What the command printed, or null when tmux did not wait for it.
- Errors
-
-
Tmux
Version – The request waits for output, names no pane, and tmux is older than 3.5.Too Low Exception
-
Recorded calls
source callsThe C# 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 LibTmux.Server.RunShellAsync.
tmux command
task materialThe tmux commands behind RunShellAsync.
tmux C API
task materialThe C declarations in tmux that implement these commands.
In other ports
task equivalence 8 other ports mappedSource-verified mappings for Run a shell command through tmux. 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 C# |
|---|---|---|
| C# | Lib Runs a shell command and reports what it printed. | This page |
| Python | libtmux Execute a shell command via $ tmux run-shell. | None recorded in the model |
| Ruby | Lib Raw tmux arguments retain tmux's separators and format semantics. | None recorded in the model |
| TypeScript | server Run a shell command through tmux and return whatever it printed. | None recorded in the model |
| Rust | server Run a shell command through tmux and collect its output. | None recorded in the model |
| Go | tmux RunShell executes a shell command through tmux and returns an owned stdout slice. Captured foreground shell jobs require tmux 3.5 before execution; older releases deliver that output to no client. A background request returns nil after tmux accepts the job. TargetPane delivers output to that pane on older supported daemons. AsTmuxCommand uses native tmux command semantics rather than promising captured shell-job output. Unsupported optional flags follow UnsupportedPolicy. A completed stderr result is an error; context cancellation can be observed with errors.Is but does not establish that tmux did not start the job. | None recorded in the model |
| Java | io Runs a shell command for its effect. Nothing is claimed about what it printed. | on Shell |
| C++ | libtmux:: Run a shell command on the machine the server is on. | readonly |
| Raku | Lib Run literal shell source through tmux. Background acknowledgement is not job completion. | Background acknowledgement does not establish job completion. |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
Server.run(_:in:) types a command into a pane rather than running it on the host
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 Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.