rmux 0.6.1

A local terminal multiplexer with a tmux-style CLI, daemon runtime, Rust SDK, and ratatui integration.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use rmux_client::Connection;
use rmux_proto::Target;

use super::{expect_command_output, write_command_output, ExitFailure};

pub(in crate::cli) fn print_target_format(
    connection: &mut Connection,
    _command_name: &str,
    target: Target,
    template: &str,
) -> Result<(), ExitFailure> {
    let response = connection
        .display_message(Some(target), true, Some(template.to_owned()))
        .map_err(ExitFailure::from_client)?;
    let output = expect_command_output(&response, "display-message")?;
    write_command_output(output)
}