Clean screen before first display - clic - Clic is an command line interactive … | |
git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit f5b0833db47c8cb4507cc83104f63698dd92f810 | |
parent fb5155bf84450fec31f6b69a49fbdc07aee5aa70 | |
Author: Solene Rapenne <[email protected]> | |
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(-) | |
--- | |
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))) |