Struct crossbundle_tools::utils::Shell [−][src]
pub struct Shell { /* fields omitted */ }Expand description
An abstraction around console output that remembers preferences for output verbosity and color.
Implementations
Creates a new shell (color choice and verbosity), defaulting to ‘auto’ color and verbose output.
Creates a shell from a plain writable object, with no color, and max verbosity.
Sets whether the next print should clear the current line.
Returns true if the needs_clear flag is unset.
Returns true if stderr is a tty.
Erase from cursor to end of line.
Shortcut to right-align and color green a status.
Shortcut to right-align and color green a status message.
Shortcut to right-align a status message.
Runs the callback only if we are in verbose mode.
Runs the callback if we are not in verbose mode.
Updates the verbosity of the shell.
Updates the color choice (always, never, or auto) from a string..
Gets the current color choice.
If we are not using a color stream, this will always return Never, even if the
color choice has been set to something else.
Whether the shell supports color.
Prints a message and translates ANSI escape code into console colors.
