Recently Written · git

clic

MIRROR ONLY Gopher client with pretty colours in Common Lisp

git clone https://github.com/equwal/clic

Log | Files | Refs


commit 7177f07c0261e877fcc1d027b7c9d0b5581142cc
Solene Rapenne <solene@perso.pw>
2018-01-03 10:37:08 +0100

Revert code to remove gopher:// in argv

 clic.lisp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/clic.lisp b/clic.lisp
index 8b95013..a783248 100644
--- a/clic.lisp
+++ b/clic.lisp
@@ -376,7 +376,9 @@
 
 (defun parse-url(url)
   "parse a gopher url and return a location"
-  (let ((url (string-left-trim "gopher://" url)))
+  (let ((url (if (= 0 (search "gopher://" url))
+                 (subseq url 9)
+                 url)))
 
     ;; splitting with / to get host:port and uri
     ;; splitting host and port to get them