Struct broot::verb::ExecutionStringBuilder [−][src]
pub struct ExecutionStringBuilder<'b> {
pub sel_info: SelInfo<'b>,
// some fields omitted
}
Expand description
a temporary structure gathering selection and invocation parameters and able to generate an executable string from a verb’s execution pattern
Fields
sel_info: SelInfo<'b>
the current file selection
Implementations
constructor to use when there’s no invocation string (because we’re in the process of building one, for example when a verb is triggered from a key shortcut)
pub fn with_invocation(
invocation_parser: &Option<InvocationParser>,
sel_info: SelInfo<'b>,
app_state: &'b AppState,
invocation_args: &Option<String>
) -> Self
fills groups having a default value (after the colon)
This is used to fill the input in case on non auto_exec verb triggered with a key
build a shell compatible command, with escapings
pub fn sel_shell_exec_string(
&self,
exec_pattern: &ExecPattern,
sel: Option<Selection<'_>>
) -> String
pub fn sel_shell_exec_string(
&self,
exec_pattern: &ExecPattern,
sel: Option<Selection<'_>>
) -> String
build a shell compatible command, with escapings, for a specific selection (this is intended for execution on all selections of a stage)
build a vec of tokens which can be passed to Command to launch an executable