Previous Entry Share Next Entry
10:58 pm, 6 May 08

terminal emulation

When you run script (see man 1 script if you're not familiar with it) it logs every keystroke you type, including backspacing over typos. Val asked today: how can you format that output so that it appears as the result? I found it interesting to think about. You'd imagine there'd be some way to run terminal emulation (?) and then somehow pipe that through cat. It's an interesting mixing of levels; I started running my mouth off about screen and vte but didn't come to a good conclusion.

Along those lines, it made me think of this interesting thread in which "cmd --color" produces escape codes while "cmd --color | cat" produces colored output. (Try to guess the circumstances before you read the other side of that link!)