From 5ea72f878a13bf4bac53429f4bc436702ff61e25 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Mon, 21 Dec 2020 20:38:12 +0000 Subject: [PATCH] display tags in 'task info' --- cli/src/invocation/cmd/info.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/src/invocation/cmd/info.rs b/cli/src/invocation/cmd/info.rs index 852c8faa9..99f470eb4 100644 --- a/cli/src/invocation/cmd/info.rs +++ b/cli/src/invocation/cmd/info.rs @@ -30,6 +30,11 @@ pub(crate) fn execute( t.add_row(row![b->"Description", task.get_description()]); t.add_row(row![b->"Status", task.get_status()]); t.add_row(row![b->"Active", task.is_active()]); + let mut tags: Vec<_> = task.get_tags().map(|t| format!("+{}", t)).collect(); + if !tags.is_empty() { + tags.sort(); + t.add_row(row![b->"Tags", tags.join(" ")]); + } } t.print(w)?; }