diff --git a/pit.nimble b/pit.nimble index f9e8293..418d020 100644 --- a/pit.nimble +++ b/pit.nimble @@ -1,6 +1,6 @@ # Package -version = "4.6.2" +version = "4.7.0" author = "Jonathan Bernard" description = "Personal issue tracker." license = "MIT" @@ -22,4 +22,4 @@ requires @[ ] task updateVersion, "Update the version of this package.": - exec "update_nim_package_version pit 'src/pitpkg/version.nim'" + exec "update_nim_package_version pit 'src/pitpkg/version.nim'" \ No newline at end of file diff --git a/src/pit.nim b/src/pit.nim index a306c88..63f17f6 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, ospaths, sequtils, +import cliutils, docopt, json, logging, options, os, sequtils, tables, terminal, times, timeutils, unicode, uuids from nre import re @@ -404,8 +404,15 @@ Options: if ctx.triggerPtk: if targetState == Current: let issue = ctx.tasksDir.loadIssueById($(args[""][0])) - var cmd = "ptk start " - if issue.tags.len > 0: cmd &= "-g \"" & issue.tags.join(",") & "\"" + var cmd = "ptk start" + if issue.tags.len > 0 or issue.properties.hasKey("context"): + let tags = concat( + issue.tags, + if issue.properties.hasKey("context"): @[issue.properties["context"]] + else: @[] + ) + cmd &= " -g \"" & tags.join(",") & "\"" + cmd &= " -n \"pit-id: " & $issue.id & "\"" cmd &= " \"" & issue.summary & "\"" discard execShellCmd(cmd) elif targetState == Done or targetState == Pending: diff --git a/src/pitpkg/version.nim b/src/pitpkg/version.nim index 3fc14c9..2401c7a 100644 --- a/src/pitpkg/version.nim +++ b/src/pitpkg/version.nim @@ -1 +1 @@ -const PIT_VERSION* = "4.6.2" \ No newline at end of file +const PIT_VERSION* = "4.7.0" \ No newline at end of file