From: Eric Smith <es@fruitcom.com>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: sending escape sequences to print in color - thanks
Date: Mon, 24 Mar 2003 22:58:36 +0100 [thread overview]
Message-ID: <20030324215835.GM26991@fruitcom.com> (raw)
In-Reply-To: <20030324225244.C131@pcchazelas.free.fr>
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
next prev parent reply other threads:[~2003-03-24 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-24 21:00 sending escape sequences to print in color Eric Smith
2003-03-24 21:40 ` Dan Nelson
2003-03-24 21:52 ` Stephane CHAZELAS
2003-03-24 21:58 ` Eric Smith [this message]
2003-03-24 22:32 ` sending escape sequences to print in color - thanks Geoff Wing
2003-03-25 6:33 ` Stephane CHAZELAS
2003-03-25 0:03 ` sending escape sequences to print in color Thorsten Kampe
2003-03-24 22:12 ` Phil Gregory
2003-03-25 5:24 ` Clint Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030324215835.GM26991@fruitcom.com \
--to=es@fruitcom.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).