I am trying understand how terminal work, doing different tricks, like writing from one tty to another, changing settings
tty2, etc. Also, I try this stuff - change color by escape sequence directly, from keyboard. That is, not through
echo -e '\e[0;31m', but by input from keyboard. It doesn’t work.
I do this steps:
- In the
bashto the sleep mode, by
sleep 10m. Typing word 'one'.
- Go to
echo -n ^[[0;31m > /dev/tty2, First character
^[get this way Ctrl + v Esc
- Return to
tty2, typing word 'two'. Yes - color was changed to red, from another tty.
- Repeat steps 3,4, but with green color and word 'three'
- And finally, trying send escape sequence directly from keyboard, not another
tty2. I do everything the same way - Esc (Ctrl + v doesn't needed, because readline is sleeping), then
[0;37m, but get this:
Question: Why does it work this way? All characters the same, terminal state the same, but in one case terminal get escape sequence, and in another case don't.