summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2021-09-21 13:13:09 +0530
committerBonfaceKilz2021-09-21 12:40:48 +0300
commitdae8836dbfbe80075af8052a4db6331c32bb5901 (patch)
tree495787c84526418e91ef97455c1867bcee3f9cc3
parent24aa687f63956fa5cb85d25d80e01d53362a877e (diff)
downloadgn-gemtext-dae8836dbfbe80075af8052a4db6331c32bb5901.tar.gz
gnbug: Print issue numbers.
* gnbug (main): Print issue numbers in issue listing.
-rwxr-xr-xgnbug36
1 files 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))