libtmux::Server::run_shell
- Module
- libtmux
- Declared in
- Server
- Package
- libtmux-cxx
- Source
- include/libtmux/server.hpp
- Other languages
- PythonRuby Lua TypeScriptRustGoJava.NET Swift
- run_shell ( command : std::string_view , background : bool = false ) expected< void, CommandFailure >
-
Run a shell command on the machine the server is on.
Reports whether it ran, not what it printed. tmux hands back the output on most versions and discards it on 3.3a and 3.4, and an answer that is empty on two versions in the middle of the range is worse than no answer at all. A caller that needs the output redirects it to a file.
What is uniform is the exit status: a command that fails is a failure here, carrying its code in
exit_code.backgroundis tmux's-b, which returns as soon as the command is started. Nothing can then be said about how it ended, so a backgrounded command that fails still reports success.In 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.Server.Server.runShell - .NET
LibTmux.Server.RunShellAsync - Swift
Server.run(_:in:)types a command into a pane rather than running it on the host
- Python
0 declared, 0 inherited