Struct xshell::Cmd[][src]

pub struct Cmd { /* fields omitted */ }
Expand description

A command.

Implementations

Creates a new Cmd that executes the given program.

Pushes an argument onto this Cmd.

Pushes the arguments onto this Cmd.

Equivalent to std::process::Command::envs.

Note: This does not replace the child process’s environment, unless you call Cmd::env_clear first.

Equivalent to std::process::Command::env_clear.

Note that on Windows some environmental variables are required for process spawning. See https://github.com/rust-lang/rust/issues/31259.

Returns a Cmd that will ignore the stdout stream. This is equivalent of attaching stdout to /dev/null.

Returns a Cmd that will ignore the stderr stream. This is equivalent of attaching stderr to /dev/null.

Returns a Cmd that ignores its exit status.

Returns a Cmd with the given stdin.

Returns a Cmd that echoes itself (or not) as specified.

Returns a Cmd that is secret (or not) as specified.

If a command is secret, it echoes <secret> instead of the program and its arguments.

Returns the stdout from running the command.

Returns the stderr from running the command.

Returns a std::process::Output from running the command.

Runs the command.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.