Add support to type 9 - clic - Clic is an command line interactive client for gopher written in Common LISP
HTML git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 3f8100a6e7505d2f879512461b392c83d934a444
DIR parent e929b6fefdd73d15839c62d579d04b6a15e7fb1f
HTML Author: Solene Rapenne <solene@perso.pw>
Date: Sun, 31 Dec 2017 16:18:33 +0100
Add support to type 9
Diffstat:
M clic.lisp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
---
DIR diff --git a/clic.lisp b/clic.lisp
@@ -211,6 +211,8 @@
;; 9 Binary
(check "9"
+ (setf (gethash line-number *links*)
+ (make-location :host host :port port :uri uri :type line-type ))
(print-with-color text 'red line-number))
;; + redundant server
@@ -481,16 +483,18 @@
(display-buffer "1")))
;; image
- ((string= "I" type)
+ ((or
+ (string= "I" type)
+ (string= "9" type))
(let ((location (car *history*)))
(uiop:run-program (list "xdg-open"
- (print (concatenate 'string
+ (concatenate 'string
"/tmp/"
(subseq ;; get the text after last /
(location-uri location)
(1+ (position #\/
(location-uri location)
- :from-end t))))))))
+ :from-end t)))))))
(pop *history*)
(setf *buffer* (copy-array *previous-buffer*))
(setf *links* (make-hash-table))