Add the ability to edit all issues in a given state.
This commit is contained in:
parent
2b5f82203c
commit
2404f6a3d1
@ -1,6 +1,6 @@
|
|||||||
# Package
|
# Package
|
||||||
|
|
||||||
include "src/pitpkg/private/version.nim"
|
include "src/pitpkg/version.nim"
|
||||||
|
|
||||||
version = PIT_VERSION
|
version = PIT_VERSION
|
||||||
author = "Jonathan Bernard"
|
author = "Jonathan Bernard"
|
||||||
|
19
src/pit.nim
19
src/pit.nim
@ -8,7 +8,7 @@ import strutils except capitalize, toUpper, toLower
|
|||||||
import pitpkg/private/libpit
|
import pitpkg/private/libpit
|
||||||
export libpit
|
export libpit
|
||||||
|
|
||||||
include "pitpkg/private/version.nim"
|
include "pitpkg/version.nim"
|
||||||
|
|
||||||
type
|
type
|
||||||
CliContext = ref object
|
CliContext = ref object
|
||||||
@ -226,7 +226,7 @@ Usage:
|
|||||||
pit ( new | add) <summary> [<state>] [options]
|
pit ( new | add) <summary> [<state>] [options]
|
||||||
pit list [<listable>] [options]
|
pit list [<listable>] [options]
|
||||||
pit ( start | done | pending | todo-today | todo | suspend ) <id>... [options]
|
pit ( start | done | pending | todo-today | todo | suspend ) <id>... [options]
|
||||||
pit edit <id>...
|
pit edit <ref>...
|
||||||
pit ( delete | rm ) <id>...
|
pit ( delete | rm ) <id>...
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
@ -315,8 +315,19 @@ Options:
|
|||||||
stdout.writeLine ctx.formatIssue(issue)
|
stdout.writeLine ctx.formatIssue(issue)
|
||||||
|
|
||||||
elif args["edit"]:
|
elif args["edit"]:
|
||||||
for id in @(args["<id>"]):
|
for editRef in @(args["<ref>"]):
|
||||||
edit(ctx.tasksDir.loadIssueById(id))
|
|
||||||
|
var stateOption = none(IssueState)
|
||||||
|
|
||||||
|
try: stateOption = some(parseEnum[IssueState](editRef))
|
||||||
|
except: discard
|
||||||
|
|
||||||
|
if stateOption.isSome:
|
||||||
|
let state = stateOption.get
|
||||||
|
ctx.loadIssues(state)
|
||||||
|
for issue in ctx.issues[state]: edit(issue)
|
||||||
|
|
||||||
|
else: edit(ctx.tasksDir.loadIssueById(editRef))
|
||||||
|
|
||||||
elif args["start"] or args["todo-today"] or args["done"] or
|
elif args["start"] or args["todo-today"] or args["done"] or
|
||||||
args["pending"] or args["todo"] or args["suspend"]:
|
args["pending"] or args["todo"] or args["suspend"]:
|
||||||
|
@ -6,7 +6,7 @@ import nre except toSeq
|
|||||||
|
|
||||||
import pitpkg/private/libpit
|
import pitpkg/private/libpit
|
||||||
|
|
||||||
include "pitpkg/private/version.nim"
|
include "pitpkg/version.nim"
|
||||||
|
|
||||||
type
|
type
|
||||||
PitApiCfg* = object
|
PitApiCfg* = object
|
||||||
|
@ -1 +0,0 @@
|
|||||||
const PIT_VERSION = "4.2.0"
|
|
1
src/pitpkg/version.nim
Normal file
1
src/pitpkg/version.nim
Normal file
@ -0,0 +1 @@
|
|||||||
|
const PIT_VERSION = "4.3.0"
|
Loading…
x
Reference in New Issue
Block a user