Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: print color escapes
On Thu, Jan 1, 2015 at 6:39 PM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> I'm just realizing something that might not be true: In the old days, it
> would have been the hardware terminal itself that interpreted these codes,
> but now, it's my 'terminal emulator', not the screen itself, which is why
> it's called an 'emulator'. Correct? And I can't believe I'm saying this,
> but too bad that these control characters are part of the data stream,
> there should have been a 'vi' insert vs. control mode. One special char,
> and you're in control mode until you toggle out of it again.
>
The "hardware terminal" you refer to was itself a computer that executed
code. The only difference between it and the "terminal emulator" you're
likely using today is that the former was embedded in a piece of hardware
with a very narrow function whereas the modern terminal emulator (e.g.,
iTerm2 that I use on Mac OS X) runs on a device with a very broad function.
But they both execute programs that recognize specific input sequences and
act accordingly (e.g., clearing the "screen").
The whole point of the ANSI X3.64 standard (as partially implemented by the
DEC VT100) was to implement a vi style of insert versus control mode. The
CSI sequence (ESC [) switched the terminal from "insert" to "control" mode.
And once the control command (e.g., clear screen) was recognized and acted
upon the input mode reverted to "insert".
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author