RosettaCodeData/Task/Terminal-control-Hiding-the-cursor/Common-Lisp/terminal-control-hiding-the-cursor.lisp
2015-11-18 06:14:39 +00:00

13 lines
374 B
Common Lisp

(defun sh (cmd)
#+clisp (shell cmd)
#+ecl (si:system cmd)
#+sbcl (sb-ext:run-program "/bin/sh" (list "-c" cmd) :input nil :output *standard-output*)
#+clozure (ccl:run-program "/bin/sh" (list "-c" cmd) :input nil :output *standard-output*))
(defun show-cursor (x)
(if x (sh "tput cvvis") (sh "tput civis")))
(show-cursor nil)
(sleep 3)
(show-cursor t)
(sleep 3)