From 686dcbbc1f49b318028c68e290e67dfd211c8969 Mon Sep 17 00:00:00 2001 From: Lucas Colombo Date: Mon, 1 Apr 2024 01:30:09 -0300 Subject: [PATCH] =?UTF-8?q?feat(cli):=20=E2=9C=A8=20/stylize:=20`stl`=20al?= =?UTF-8?q?ias=20for=20the=20stylize=20fn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/cli/stylize.rs | 2 +- lib/cli/stylize/stylizer.rs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/cli/stylize.rs b/lib/cli/stylize.rs index 0010d03..315225f 100644 --- a/lib/cli/stylize.rs +++ b/lib/cli/stylize.rs @@ -1,7 +1,7 @@ mod style; mod stylizer; -pub use stylizer::{stylize, Stylize}; +pub use stylizer::{stylize, stl, Stylize}; #[cfg(test)] mod tests; diff --git a/lib/cli/stylize/stylizer.rs b/lib/cli/stylize/stylizer.rs index 72d3ce4..ea0d0d7 100644 --- a/lib/cli/stylize/stylizer.rs +++ b/lib/cli/stylize/stylizer.rs @@ -235,3 +235,15 @@ pub fn stylize>(s: S, instructions: &str) -> String { formatted } + +// alias for stylize: stl + +/// 🧉 » stl fn +/// -- +/// +/// Stylizes a string with optional ANSI color and attributes. +/// +/// This is an alias for the `stylize` function. +pub fn stl>(s: S, instructions: &str) -> String { + stylize(s, instructions) +} \ No newline at end of file