From 4b151dd10d9b41ae22cfbf8c5bdc401483f400d0 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Wed, 22 Jan 2025 17:52:03 +0100 Subject: [PATCH] update --- src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 91ca737..10b97e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use git::{bootstrap, commit, create_new_branch, delete_branch, fetch, git_add, p use gitmoji::{CommitMessage, select_gitmoji}; use std::io::Read; use subprocess::{Exec, Redirection}; +use yansi::{Color, Paint}; mod args; mod git; @@ -71,8 +72,13 @@ pub fn show_rg(regex: &str) { } pub fn show_todos() { - println!("{} todos found.", todos_amount()); - show_rg(TODO_REGEX); + let amount = todos_amount(); + if amount == 0 { + println!("{}", "✨ No TODOs 🍃".paint(Color::Green).bold()); + } else { + println!("{} TODOs found.", amount); + show_rg(TODO_REGEX); + } } fn main() {