From 284aadc37c028087283f5a8b61fc5805979f506f Mon Sep 17 00:00:00 2001 From: Slack Coder Date: Tue, 10 Jan 2023 12:36:03 -0500 Subject: [PATCH] cli: Avoid trailing spaces on list Use '-'s to avoid trailing spaces on items when listing patches. The spaces are used as part of the format with colouring. However they are a nuisance to support in testing given the autoformatting of editors to remove them. Signed-off-by: Slack Coder --- radicle-cli/examples/rad-patch.md | 4 ++-- radicle-cli/src/commands/patch/list.rs | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/radicle-cli/examples/rad-patch.md b/radicle-cli/examples/rad-patch.md index d6a6f19a..589c3158 100644 --- a/radicle-cli/examples/rad-patch.md +++ b/radicle-cli/examples/rad-patch.md @@ -53,12 +53,12 @@ It will now be listed as one of the project's open patches. ``` $ rad patch - YOU PROPOSED +- YOU PROPOSED - define power requirements 3b1f58414e5 R0 7939a9e (flux-capacitor-power) ahead 1, behind 0 └─ * opened by z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi (you) [..] - OTHERS PROPOSED +- OTHERS PROPOSED - Nothing to show. diff --git a/radicle-cli/src/commands/patch/list.rs b/radicle-cli/src/commands/patch/list.rs index bef975ab..a19b7734 100644 --- a/radicle-cli/src/commands/patch/list.rs +++ b/radicle-cli/src/commands/patch/list.rs @@ -39,7 +39,10 @@ pub fn run( } } term::blank(); - term::print(term::format::badge_positive("YOU PROPOSED")); + term::print(format!( + "-{}-", + term::format::badge_secondary("YOU PROPOSED") + )); if own.is_empty() { term::blank(); @@ -52,7 +55,10 @@ pub fn run( } } term::blank(); - term::print(term::format::badge_secondary("OTHERS PROPOSED")); + term::print(format!( + "-{}-", + term::format::badge_secondary("OTHERS PROPOSED") + )); if other.is_empty() { term::blank();