Struct broot::verb::ExecutionStringBuilder
source · pub struct ExecutionStringBuilder<'b> {
pub sel_info: SelInfo<'b>,
/* private fields */
}
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§
source§impl<'b> ExecutionStringBuilder<'b>
impl<'b> ExecutionStringBuilder<'b>
sourcepub fn without_invocation(sel_info: SelInfo<'b>, app_state: &'b AppState) -> Self
pub fn without_invocation(sel_info: SelInfo<'b>, app_state: &'b AppState) -> Self
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
sourcepub fn invocation_with_default(
&self,
verb_invocation: &VerbInvocation
) -> VerbInvocation
pub fn invocation_with_default(
&self,
verb_invocation: &VerbInvocation
) -> VerbInvocation
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
sourcepub fn shell_exec_string(&self, exec_pattern: &ExecPattern) -> String
pub fn shell_exec_string(&self, exec_pattern: &ExecPattern) -> String
build a shell compatible command, with escapings
sourcepub 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)
sourcepub fn exec_token(&self, exec_pattern: &ExecPattern) -> Vec<String> ⓘ
pub fn exec_token(&self, exec_pattern: &ExecPattern) -> Vec<String> ⓘ
build a vec of tokens which can be passed to Command to launch an executable
sourcepub fn sel_exec_token(
&self,
exec_pattern: &ExecPattern,
sel: Option<Selection<'_>>
) -> Vec<String> ⓘ
pub fn sel_exec_token(
&self,
exec_pattern: &ExecPattern,
sel: Option<Selection<'_>>
) -> Vec<String> ⓘ
build a vec of tokens which can be passed to Command to launch an executable