Module prelude

Module prelude 

Source
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§

owo

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.
LightColor
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_colors Style 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 stderr stream.
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 stderr stream. 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§

DarkColor
ANSI colors for a dark theme.