is there a simple way of getting a colored output with sbcl? I need the same output as from the
- Code: Select all
echo -e "\033[34mBlah"
nuntius wrote:I'm not sure why #\Esc or the like don't work, but the following does.
(format t "~C[34mBlah" (code-char 27))
(format t "~C[34mBlah" #\Esc)
nuntius wrote:What I couldn't get was something like "#\Esc[34mBlah". The code-char was simply cruft from experimentation.
gugamilare wrote:Just note that (code-char 27) will not necessarily return #\Esc according to the ANSI spec. All implementation that I know of use either ASCII or Unicode, which means that it will work in all of them, but this is not required - as much as the ANSI spec concerns, you can create an implementation which uses characters with your own encoding.
nuntius wrote:Please... If (char-code #\Esc) is not 27, there's little chance of the terminal understanding either... A real programmer would write a raw byte array anyway.
Users browsing this forum: Google [Bot] and 2 guests