diff options
author | Arun Isaac | 2021-09-22 16:02:18 +0530 |
---|---|---|
committer | Arun Isaac | 2021-09-22 16:04:49 +0530 |
commit | a8868a3f7b6940a3699fccc5cd6f956c72475ac9 (patch) | |
tree | 2a0ca4063302d833ad30f33a2c95c5ef8fff0829 /gnbug | |
parent | 22c014cdc1f6cf92984026e015dff6f63bcd69b3 (diff) | |
download | gn-gemtext-a8868a3f7b6940a3699fccc5cd6f956c72475ac9.tar.gz |
gnbug: Add show sub-command.
* gnbug: Import (rnrs io ports).
(main): Add show sub-command.
(gnbug-show): New function.
* README.gmi (gnbug): Document the show sub-command.
Diffstat (limited to 'gnbug')
-rwxr-xr-x | gnbug | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -2,6 +2,7 @@ !# (import (rnrs hashtables) + (rnrs io ports) (srfi srfi-9) (srfi srfi-26) (srfi srfi-37) @@ -238,13 +239,20 @@ export EDITOR=emacsclient")) (issue-file (list-ref (issues) (1- (string->number issue-number)))))) +(define (gnbug-show issue-number) + (put-string (current-output-port) + (call-with-input-file (issue-file (list-ref (issues) + (1- (string->number issue-number)))) + get-string-all))) + (define main (match-lambda* ((_ command args ...) (apply (match command ("news" gnbug-news) ("list" gnbug-list) - ("edit" gnbug-edit)) + ("edit" gnbug-edit) + ("show" gnbug-show)) args)) ;; gnbug is an alias for `gnbug list' ((_) |