TmuxArg
Text bound for a tmux argument that tmux expands as a format.
Source and package
- Qualified name
-
libtmux::target:: Tmux Arg - Module
- target
- Package
- libtmux
- Source
- crates/libtmux/src/target.rs
-
Description#
tmux runs its format machinery over a session or window name, a pane title, and a
-cstart directory before it uses them, so#(command)in caller text runs a shell. Every such argument in this crate takes this type, and every conversion into it escapes: text a program did not write arrives as itself, and asking for expansion is a visible call toTmuxArg::format().Examples#
use libtmux::TmuxArg;// The ordinary path. `From` escapes, so tmux stores what was asked.let literal = TmuxArg::from("release#1");assert_eq!(literal.as_os_str(), "release##1");// Expansion is opt-in and reads as such.let expanded = TmuxArg::format("#{pane_current_path}");assert_eq!(expanded.as_os_str(), "#{pane_current_path}");