Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: sending escape sequences to print in color - thanks



On Mon, Mar 24, 2003 at 10:58:36PM +0100, Eric Smith wrote:
[...]
> But one use I was looking for was to write(1) to another terminal viz.
> echotc AF 6 ; echotc AB 4 ; echo "Cyan on Blue"|write eric /dev/pts/3
> or 
> print "$bg[cyan]$fg[blue]Blue on Cyan"|write eric /dev/pts/3
> 
> but alas no colors on the destination terminal (of course this does not prove
> it but trust me):
> [eric@pear ~] 3 $
> Message from eric@pear on pts/2 at 22:48 ...
> Cyan on Blue
> EOF
> 
> Message from eric@pear on pts/4 at 22:52 ...
> ^[[46m^[[34mBlue on Cyan
> EOF
[...]

Be glad you can't. Some of such control sequences can serve to
put the remote terminal in an alternate charset or resize the
window to null, or iconify it or change the font to unreadable
or even in some versions of rxvt to run arbitrary commands!

-- 
Stéphane



Messages sorted by: Reverse Date, Date, Thread, Author