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 f5b0833db47c8cb4507cc83104f63698dd92f810
Solene Rapenne <solene@perso.pw>
2018-04-06 12:45:41 +0200

Clean screen before first display

 clic.lisp | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/clic.lisp b/clic.lisp
index 7d822ab..6bfb8de 100644
--- a/clic.lisp
+++ b/clic.lisp
@@ -80,6 +80,10 @@
 (add-color 'http       0 33)
 ;;;; END ANSI colors
 
+(defun clear()
+  "Clear the screen"
+  (format t "~A[H~@*~A[J" #\escape))
+
 ;;;; is the output interactive or a pipe ?
 (defun ttyp()
   "return t if the output is a terminal"
@@ -688,6 +692,7 @@
   display it and exit and finally, the redirected case where clic will
   print to stdout and exit."
 
+  (clear)
   (ignore-errors ;; lisp is magic
     (let ((destination
            (let ((argv (get-argv)))