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-dotnet

Server.RunShellAsync

Runs a shell command and reports what it printed.

Source and package
Qualified name
LibTmux.Server.RunShellAsync
Namespace
LibTmux
Declared in
Server
Package
LibTmux
Source
src/LibTmux/Server.Execution.cs

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 (RunShellRequest) – What to run, and how.

  • cancellationToken (CancellationToken) – Cancels waiting for tmux's reply. tmux itself is not told: the server, not this process, owns run-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 a run-shell child 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

Recorded calls

source calls
No call edges in the C# model.

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

The tmux commands behind RunShellAsync.

tmux C API

task material

The C declarations in tmux that implement these commands.

In other ports

task equivalence 8 other ports mapped

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

Run a shell command through tmux in each port
PortAPIDiffers from C#
C# LibTmux.Server.RunShellAsync
Runs a shell command and reports what it printed.
This page
Python libtmux.Server.run_shell
Execute a shell command via $ tmux run-shell.
None recorded in the model
Ruby LibTmux::Server#run
Raw tmux arguments retain tmux's separators and format semantics.
None recorded in the model
TypeScript server.Server.runShell
Run a shell command through tmux and return whatever it printed.
None recorded in the model
Rust server.Server.run_shell
Run a shell command through tmux and collect its output.
None recorded in the model
Go tmux.Server.RunShell
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.github.libtmux.Shell.run
Runs a shell command for its effect. Nothing is claimed about what it printed.
on Shell
C++ libtmux::Server::run_shell
Run a shell command on the machine the server is on.
readonly
Raku LibTmux::Server.run-shell
Run literal shell source through tmux. Background acknowledgement is not job completion.
Background acknowledgement does not establish job completion.
No Haskell equivalent.

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

No Swift equivalent.

Server.run(_:in:) types a command into a pane rather than running it on the host

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 Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc
Search in

Type to search.

Reference previewOpen reference