From dae8836dbfbe80075af8052a4db6331c32bb5901 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 21 Sep 2021 13:13:09 +0530 Subject: gnbug: Print issue numbers. * gnbug (main): Print issue numbers in issue listing. --- gnbug | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/gnbug b/gnbug index b814477..9ec0e62 100755 --- a/gnbug +++ b/gnbug @@ -209,22 +209,26 @@ terminal." invalid-operand '()))) (format #t "~%total ~a~%" - (list-transduce (compose (tfilter (lambda (issue) - (or (not (assq 'assigned args)) - (member (assq-ref args 'assigned) - (issue-assigned issue))))) - (tlog (lambda (_ issue) - (format #t "~a ~a ~a~a~%" - (issue-created-relative-date issue) - (cyan (issue-creator issue)) - (issue-title issue) - (match (issue-assigned issue) - (() "") - (assignees - (magenta (string-append " (assigned: " - (string-join assignees ", ") - ")")))))))) + (list-transduce (compose (tenumerate 1) + (tfilter (match-lambda + ((_ . issue) + (or (not (assq 'assigned args)) + (member (assq-ref args 'assigned) + (issue-assigned issue)))))) + (tlog (match-lambda* + ((_ (index . issue)) + (format #t "~a ~a ~a ~a~a~%" + (magenta (string-append "#" (number->string index))) + (issue-created-relative-date issue) + (cyan (issue-creator issue)) + (issue-title issue) + (match (issue-assigned issue) + (() "") + (assignees + (magenta (string-append " (assigned: " + (string-join assignees ", ") + ")"))))))))) rcount - (issues))))))) + (issues))))) (apply main (command-line)) -- cgit v1.2.3