Clean screen before first display - 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 f5b0833db47c8cb4507cc83104f63698dd92f810 DIR parent fb5155bf84450fec31f6b69a49fbdc07aee5aa70 HTML Author: Solene Rapenne <solene@perso.pw> Date: Fri, 6 Apr 2018 12:45:41 +0200 Clean screen before first display Diffstat: M clic.lisp | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) --- DIR diff --git 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)))