Server.run
Run one command and return its standard output.
Source and package
- Qualified name
-
libtmux::Server:: run - Namespace
- libtmux
- Declared in
Server- Package
- libtmux-cxx
- Source
- include/libtmux/server.hpp
- [[
C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] expected<std::string , CommandFailure > run(const CommandRequest & command, std::optional <std::chrono:: > timeout = {}, std::milliseconds optional <std::size > output_t _limit = {}) const; -
Description#
The timeout still rides on the call: how long a caller will wait is a property of what they asked for, and listing sessions does not share a deadline with attaching a client. Unset takes the server's
ExecutionPolicy, which is thirty seconds rather than forever — a floor, not a guess at what this particular command needs.output_limitbounds how much of tmux's answer this call will hold. Past it the command reportsFailureKind::truncatedrather than returning a prefix that reads like a complete answer. Unset uses the package default, which is ample for every listing and can be too small for a long scrollback.- Parameters