pub struct ShellBuilder { /* private fields */ }Expand description
ShellBuilder is used to turn a user-requested task into a program that can be executed by the shell.
Implementations§
Source§impl ShellBuilder
impl ShellBuilder
pub fn non_interactive(self) -> Self
Sourcepub fn command_label(&self, command_to_use_in_label: &str) -> String
pub fn command_label(&self, command_to_use_in_label: &str) -> String
Returns the label to show in the terminal tab
pub fn redirect_stdin_to_dev_null(self) -> Self
Sourcepub fn build(
self,
task_command: Option<String>,
task_args: &[String],
) -> (String, Vec<String>)
pub fn build( self, task_command: Option<String>, task_args: &[String], ) -> (String, Vec<String>)
Returns the program and arguments to run this task in a shell.
Sourcepub fn build_smol_command(
self,
task_command: Option<String>,
task_args: &[String],
) -> Command
pub fn build_smol_command( self, task_command: Option<String>, task_args: &[String], ) -> Command
Builds a smol::process::Command with the given task command and arguments.
Prefer this over manually constructing a command with the output of Self::build,
as this method handles cmd weirdness on windows correctly.
Sourcepub fn build_std_command(
self,
task_command: Option<String>,
task_args: &[String],
) -> Command
pub fn build_std_command( self, task_command: Option<String>, task_args: &[String], ) -> Command
Builds a std::process::Command with the given task command and arguments.
Prefer this over manually constructing a command with the output of Self::build,
as this method handles cmd weirdness on windows correctly.
pub fn kind(&self) -> ShellKind
Auto Trait Implementations§
impl Freeze for ShellBuilder
impl RefUnwindSafe for ShellBuilder
impl Send for ShellBuilder
impl Sync for ShellBuilder
impl Unpin for ShellBuilder
impl UnsafeUnpin for ShellBuilder
impl UnwindSafe for ShellBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more