From 9b8ad31ce3b2042ceb005b7936a058fd1e5affaf Mon Sep 17 00:00:00 2001 From: busticated Date: Sun, 26 Nov 2023 14:27:14 -0800 Subject: [PATCH] tune xtask help output --- xtask/src/tasks.rs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/xtask/src/tasks.rs b/xtask/src/tasks.rs index a12b885..f6b7c8e 100644 --- a/xtask/src/tasks.rs +++ b/xtask/src/tasks.rs @@ -90,18 +90,16 @@ impl Tasks { for task in self.map.values() { let char_count = task.name.char_indices().count(); let spaces = separator.repeat(max_col_width - char_count + padding); - let line = format!(">> {}{}{}\n", task.name, spaces, task.description); + let line = format!(" {}{}{}\n", task.name, spaces, task.description); lines.push_str(&line); for (name, description) in task.flags.iter() { let separator = " ".to_string(); let spaces = separator.repeat(max_col_width + padding); - let line = format!("\n{} >> --{} | {}\n", spaces, name, description); + let line = format!("{} ⮑ --{} | {}\n", spaces, name, description); lines.push_str(&line); } - - lines.push('\n'); } Ok(lines) @@ -192,16 +190,11 @@ mod tests { assert_eq!( tasks.help().unwrap(), [ - ">> one....task 01", - "", - " >> --bar | enables bar", - "", - " >> --foo | does the foo", - "", - ">> two....task 02", - "", - " >> --baz | invokes a baz", - "", + " one....task 01", + " ⮑ --bar | enables bar", + " ⮑ --foo | does the foo", + " two....task 02", + " ⮑ --baz | invokes a baz", "", ] .join("\n")