Server.RunShellAsync
Runs a shell command and reports what it printed.
Source and package
- RunShellAsync ( request : Run
Shell , cancellationToken : CancellationRequest Token ) Task<IReadOnly <string>?>List -
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. On tmux 3.3a and 3.4, shell text goes to pane view mode, so the process request can return an empty collection even when the shell printed lines.
- Parameters
-
-
request ( Run
Shell ) – What to run, and how.Request -
cancellationToken ( Cancellation
Token ) – 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:KillAsyncdoes not reap arun-shellchild either, so it keeps running as its own orphaned process.
-
- Returns
-
What the command printed, or null when tmux did not wait for it.
tmux command
run-shellIn other ports Run a shell command through tmux
- Python
libtmux.Server.run_shell - Ruby
LibTmux::Server#run - Lua No source-verified Lua equivalent is recorded for this operation.
- TypeScript
server.Server.runShell - Rust
server.Server.run_shell - Go
tmux.Server.RunShell - Java
io.github.libtmux.Shell.run - C++
libtmux::Server::run_shell - Swift
Server.run(_:in:)types a command into a pane rather than running it on the host - Kotlin No source-verified Kotlin equivalent is recorded for this operation.
- Scala No source-verified Scala equivalent is recorded for this operation.
- F# No source-verified F# equivalent is recorded for this operation.