diff --git a/pit.nimble b/pit.nimble index a03ee4e..7c97161 100644 --- a/pit.nimble +++ b/pit.nimble @@ -1,6 +1,6 @@ # Package -version = "4.9.2" +version = "4.9.3" author = "Jonathan Bernard" description = "Personal issue tracker." license = "MIT" diff --git a/src/pit.nim b/src/pit.nim index 4ed0260..8bfb0d7 100644 --- a/src/pit.nim +++ b/src/pit.nim @@ -1,7 +1,7 @@ ## Personal Issue Tracker CLI interface ## ==================================== -import cliutils, docopt, json, logging, options, os, sequtils, +import algorithm, cliutils, docopt, json, logging, options, os, sequtils, std/wordwrap, tables, terminal, times, timeutils, unicode, uuids from nre import re @@ -242,7 +242,8 @@ when isMainModule: let doc = """ Usage: pit ( new | add) [] [options] - pit list [] [options] + pit list contexts + pit list [] [options] pit ( start | done | pending | todo-today | todo | suspend ) ... [options] pit edit ... pit tag ... [options] @@ -475,11 +476,10 @@ Options: var stateOption = none(IssueState) var issueIdOption = none(string) - if args[""]: - if $args[""] == "contexts": listContexts = true - else: - try: stateOption = some(parseEnum[IssueState]($args[""])) - except: issueIdOption = some($args[""]) + if args["contexts"]: listContexts = true + elif args[""]: + try: stateOption = some(parseEnum[IssueState]($args[""])) + except: issueIdOption = some($args[""]) # List the known contexts if listContexts: @@ -495,7 +495,7 @@ Options: else: b ).len - for c in uniqContexts: + for c in uniqContexts.sorted: stdout.writeLine(c.alignLeft(maxLen+2) & ctx.getIssueContextDisplayName(c)) # List a specific issue diff --git a/src/pitpkg/version.nim b/src/pitpkg/version.nim index cf7dc3b..2519449 100644 --- a/src/pitpkg/version.nim +++ b/src/pitpkg/version.nim @@ -1 +1 @@ -const PIT_VERSION* = "4.9.2" \ No newline at end of file +const PIT_VERSION* = "4.9.3" \ No newline at end of file