|Did you know ...
The following predicates form a simple access mechanism to the Unix termcap library to provide terminal-independent I/O for screen terminals. These predicates are only available on Unix machines. The SWI-Prolog Windows console accepts the ANSI escape sequences.
bool. String results are returned as an atom, number
results as an integer, and bool results as the atom
If an option cannot be found, this predicate fails silently. The results
are only computed once. Successive queries on the same capability are
fast. This predicate can raise several exceptions if the terminal
environment is incomplete, notably if the environment variable
does not exist or there is no matching entry in the termcap database.
stream. As a fallback, the system uses tty_get_capability/3
co capabilities. In this case the
reported size reflects the size at the first call and is not updated
after a user-initiated resize of the terminal.
user_input stream is used.