From c7891de310a984092cb3f6b0cd02d1b8c5e2a397 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Thu, 28 Jul 2022 10:48:51 -0500 Subject: [PATCH] Show Pending in either Today's list of the Future list, but not both at the same time. --- pit.nimble | 2 +- src/pit.nim | 6 +++++- src/pitpkg/cliconstants.nim | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pit.nimble b/pit.nimble index 2e788f6..7da5e8b 100644 --- a/pit.nimble +++ b/pit.nimble @@ -1,6 +1,6 @@ # Package -version = "4.19.0" +version = "4.20.0" author = "Jonathan Bernard" description = "Personal issue tracker." license = "MIT" diff --git a/src/pit.nim b/src/pit.nim index 5fe9c84..b7dfa9d 100644 --- a/src/pit.nim +++ b/src/pit.nim @@ -263,7 +263,11 @@ proc list( if future: if today: ctx.writeHeader("Future") - for s in [Pending, Todo]: + let futureCategories = + if showToday: @[Todo] + else: @[Pending, Todo] + + for s in futureCategories: if ctx.issues.hasKey(s) and ctx.issues[s].len > 0: let visibleIssues = ctx.issues[s].filterIt( showHidden or diff --git a/src/pitpkg/cliconstants.nim b/src/pitpkg/cliconstants.nim index 5b75da2..bd6ce94 100644 --- a/src/pitpkg/cliconstants.nim +++ b/src/pitpkg/cliconstants.nim @@ -1,4 +1,4 @@ -const PIT_VERSION* = "4.19.0" +const PIT_VERSION* = "4.20.0" const USAGE* = """Usage: pit ( new | add) [] [options] @@ -166,4 +166,4 @@ Issue Properties: If present, expected to be a comma-delimited list of text tags. The -g option is a short-hand for '-p tags:'. -""" +""" \ No newline at end of file