Expand description
SuperCLI Prelude
Import everything you need for CLI styling with a single use statement:
use supercli::prelude::*;Re-exports§
pub use crate::output::symbols;
Modules§
Macros§
- error
- Print an error message with optional custom symbol
- info
- Print an info message with optional custom symbol
- styled
- Print styled text with symbol replacement and fine-grained control
- success
- Print a success message with optional custom symbol
- warning
- Print a warning message with optional custom symbol
Structs§
- OwoStyle
- A pre-computed style that can be applied to a struct using [
OwoColorize::style].
Enums§
- Color
- ANSI colors for a dark theme.
- Light
Color - ANSI colors for a light theme.
- Style
- Types of colors based on state and usage.
Functions§
- caution
- Paint a caution state.
- clean_
path - Clean a file system path by replacing the home directory with
~. - create_
style - Create a new
owo_colorsStyle instance and apply the given color. - failure
- Paint a failure state.
- file
- Paint a partial file path or glob pattern.
- hash
- Paint a hash-like value.
- id
- Paint an identifier.
- invalid
- Paint an invalid state.
- label
- Paint a label, heading, or title.
- log_
target - Dynamically apply a color to the log target/module/namespace based on the characters in the string.
- muted
- Paint a muted dark state.
- muted_
light - Paint a muted light state.
- no_
color - Return true if color has been disabled for the
stderrstream. - paint
- Paint and wrap the string with the appropriate ANSI color escape code. If colors are disabled, the string is returned as-is.
- paint_
style - Paint the string with the given style.
- path
- Paint an absolute file path.
- property
- Paint a property, key, or setting.
- shell
- Paint a shell command or input string.
- success
- Paint a success state.
- supports_
color - Return a color level support for the
stderrstream. 0 = no support, 1 = basic support, 2 = 256 colors, and 3 = 16 million colors. - symbol
- Paint a symbol, value, or number.
- url
- Paint a URL.
Type Aliases§
- Dark
Color - ANSI colors for a dark theme.