summaryrefslogtreecommitdiff
path: root/gnbug
diff options
context:
space:
mode:
authorArun Isaac2021-09-21 13:17:39 +0530
committerBonfaceKilz2021-09-21 12:40:48 +0300
commitcd53be5b71f8e240cdec1a1adaf4cfea5be73f74 (patch)
tree8a8ce8603ffa9e3a4b45241a79853d8e03dfab2d /gnbug
parentdae8836dbfbe80075af8052a4db6331c32bb5901 (diff)
downloadgn-gemtext-cd53be5b71f8e240cdec1a1adaf4cfea5be73f74.tar.gz
gnbug: Add edit sub-command.
* gnbug (main): Add edit sub-command. * README.gmi (gnbug): Document it.
Diffstat (limited to 'gnbug')
-rwxr-xr-xgnbug7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnbug b/gnbug
index 9ec0e62..a617995 100755
--- a/gnbug
+++ b/gnbug
@@ -230,5 +230,12 @@ terminal."
")")))))))))
rcount
(issues)))))
+ ((_ "edit" issue-number)
+ (unless (getenv "EDITOR")
+ (error "Please set the EDITOR environment variable to your favorite editor. For example,
+export EDITOR=emacsclient"))
+ (invoke (getenv "EDITOR")
+ (issue-file (list-ref (issues)
+ (1- (string->number issue-number))))))))
(apply main (command-line))