This is the termp Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Jul 13 22:09:34 2025 GMT+0.
The main system appears first, followed by any subsystem dependency.
termp
Check if we are in a dumb or real terminal. Provide the termp check and a quit function.
vindarel
MIT
Are we running inside a real or a dumb terminal window?
Adapt your logic for the terminal or for Slime.
A small utility that I use in [progressons](https://github.com/vindarel/progressons) and that I ~~might~~ re-use.
~~~lisp
(defvar *termp*) ; Unbound by default.
(defun termp (&key force)
"Return T if we run on a terminal.
This must fail on Slime (on Emacs’ default shell prompt) and succeed on a Lisp in a terminal window."
(if (and (not force)
(boundp ’*termp*))
*termp*
(setf *termp* (not (equalp "dumb" (uiop:getenv "TERM"))))))
~~~
There is also ‘termp:quit &optional code‘: quit the Lisp image (‘uiop:quit‘) only if we are in a non-dumb terminal. Helps to test scripts.
—
## Installation
This library is on [Ultralisp](https://ultralisp.org/github).
## Licence
WTFPL
0.1
termp.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
Packages are listed by definition order.
Definitions are sorted by export status, category, package, and then by lexicographic order.
If we are in a real terminal, really quit. Otherwise, error out.
Return T if we run on a terminal.
This must fail on Slime (on Emacs’ default shell prompt) and succeed on a Lisp in a terminal window.
Jump to: | F Q T |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
F | |||
Function, quit : | Public ordinary functions | ||
Function, termp : | Public ordinary functions | ||
| |||
Q | |||
quit : | Public ordinary functions | ||
| |||
T | |||
termp : | Public ordinary functions | ||
|
Jump to: | F Q T |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*termp* : | Private special variables | ||
| |||
S | |||
Special Variable, *termp* : | Private special variables | ||
|
Jump to: | *
S |
---|
Jump to: | F P S T |
---|
Jump to: | F P S T |
---|