Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
98f4dda1ad | |||
393be347c9 |
@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "4.10.0"
|
||||
version = "4.11.1"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Personal issue tracker."
|
||||
license = "MIT"
|
||||
|
13
src/pit.nim
13
src/pit.nim
@ -70,6 +70,8 @@ proc formatIssue(ctx: CliContext, issue: Issue): string =
|
||||
if not issue.details.isEmptyOrWhitespace:
|
||||
result &= issue.details.strip.withColor(fgCyan) & "\n"
|
||||
|
||||
result &= termReset
|
||||
|
||||
proc formatSectionIssue(ctx: CliContext, issue: Issue, width: int, indent = "",
|
||||
verbose = false): string =
|
||||
|
||||
@ -199,6 +201,10 @@ proc list(ctx: CliContext, filter: Option[IssueFilter], state: Option[IssueState
|
||||
if state.isSome:
|
||||
ctx.loadIssues(state.get)
|
||||
if filter.isSome: ctx.filterIssues(filter.get)
|
||||
if state.get == Done and showToday:
|
||||
ctx.issues[Done] = ctx.issues[Done].filterIt(
|
||||
it.hasProp("completed") and
|
||||
sameDay(getTime().local, it.getDateTime("completed")))
|
||||
stdout.write ctx.formatSection(ctx.issues[state.get], state.get, "", verbose)
|
||||
return
|
||||
|
||||
@ -221,13 +227,6 @@ proc list(ctx: CliContext, filter: Option[IssueFilter], state: Option[IssueState
|
||||
if ctx.issues.hasKey(s) and ctx.issues[s].len > 0:
|
||||
stdout.write ctx.formatSection(ctx.issues[s], s, indent, verbose)
|
||||
|
||||
if ctx.issues.hasKey(Done):
|
||||
let doneIssues = ctx.issues[Done].filterIt(
|
||||
it.hasProp("completed") and
|
||||
sameDay(getTime().local, it.getDateTime("completed")))
|
||||
if doneIssues.len > 0:
|
||||
stdout.write ctx.formatSection(doneIssues, Done, indent, verbose)
|
||||
|
||||
# Future items
|
||||
if future:
|
||||
if today: ctx.writeHeader("Future")
|
||||
|
@ -1 +1 @@
|
||||
const PIT_VERSION* = "4.10.0"
|
||||
const PIT_VERSION* = "4.11.1"
|
Reference in New Issue
Block a user