From be7c099b7bb73a847a671f0ea3696c4b7bdcc13a Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Mon, 1 Jan 2024 12:55:01 -0600 Subject: [PATCH] Format listed issues plainly when STDOUT is not a TTY --- pit.nimble | 2 +- src/pit.nim | 6 +++--- src/pitpkg/cliconstants.nim | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pit.nimble b/pit.nimble index cc4ae5c..3a159d7 100644 --- a/pit.nimble +++ b/pit.nimble @@ -1,6 +1,6 @@ # Package -version = "4.25.0" +version = "4.25.1" author = "Jonathan Bernard" description = "Personal issue tracker." license = "MIT" diff --git a/src/pit.nim b/src/pit.nim index d13a6f6..ee232e5 100644 --- a/src/pit.nim +++ b/src/pit.nim @@ -269,7 +269,7 @@ proc list( it.hasProp("completed") and sameDay(getTime().local, it.getDateTime("completed"))) - if isatty(stdin): + if isatty(stdout): stdout.write ctx.formatSection(ctx.issues[state], state, "", verbose) else: @@ -305,7 +305,7 @@ proc list( not (it.hasProp("hide-until") and it.getDateTime("hide-until") > getTime().local)) - if isatty(stdin): + if isatty(stdout): stdout.write ctx.formatSection(visibleIssues, s, indent, verbose) else: @@ -328,7 +328,7 @@ proc list( not (it.hasProp("hide-until") and it.getDateTime("hide-until") > getTime().local)) - if isatty(stdin): + if isatty(stdout): stdout.write ctx.formatSection(visibleIssues, s, indent, verbose) else: diff --git a/src/pitpkg/cliconstants.nim b/src/pitpkg/cliconstants.nim index d8f8a6f..09b0e52 100644 --- a/src/pitpkg/cliconstants.nim +++ b/src/pitpkg/cliconstants.nim @@ -1,4 +1,4 @@ -const PIT_VERSION* = "4.25.0" +const PIT_VERSION* = "4.25.1" const USAGE* = """Usage: pit ( new | add) [] [options]