Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: sending escape sequences to print in color - thanks
- X-seq: zsh-users 5981
- From: Eric Smith <es@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: sending escape sequences to print in color - thanks
- Date: Mon, 24 Mar 2003 22:58:36 +0100
- In-reply-to: <20030324225244.C131@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030324210057.GK26991@xxxxxxxxxxxx> <20030324214051.GB63147@xxxxxxxxxxxxxxxx> <20030324225244.C131@xxxxxxxxxxxxxxxxxx>
Stephane CHAZELAS said:
> On Mon, Mar 24, 2003 at 03:40:51PM -0600, Dan Nelson wrote:
> > In the last episode (Mar 24), Eric Smith said:
> > > How do I print (shell builtin) or scho or better still write (1)
> > > to screen and produce color characters or inverse video.
> >
> > echotc AF 6 ; echotc AB 4 ; echo "Cyan on Blue!"
>
> Or
> autoload colors
> colors
>
> print "$bg[cyan]$fg[blue]Blue on Cyan!"
>
Thanks for both - nice to know and to use - great!
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
oops - this just came in (same issue):
print "\e[3${i}mFred $i here\e[0m"|write eric /dev/pts/3
Message from eric@pear on pts/4 at 22:56 ...
^[[3mFred here^[[0m
EOF
Perhaps I am being greedy - I learnt a great new trick today.
Thanks guys ...
--
Eric Smith
Messages sorted by:
Reverse Date,
Date,
Thread,
Author