This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: csh color codes
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: gobo at gobo-net dot de
- Cc: cygwin at cygwin dot com
- Date: Thu, 29 Jan 2004 09:59:52 -0500 (EST)
- Subject: Re: csh color codes
- References: <E1AmCi6-00009G-00@mrelay00.kundenservices.net>
- Reply-to: cygwin at cygwin dot com
On Thu, 29 Jan 2004 gobo@gobo-net.de wrote:
> Dear all,
>
> I am running the latest Cygwin on my Win2k and I'm using csh as the
> standard shell. The color mode for XTerm is enabled and works fine, e.g.
> with "ls --color".
>
> However I have a problem to figure out how to generate the appropriate
> control (escape) sequences to included colors in shell script outputs. I
> have some shell scripts here which originate from a HP-UX based csh.
> There, the escape sequences are generated by pressing "Ctrl + V" + "Esc" +
> "[" + 'code', where 'code' is e.g. "1m" for bold or "32m" for green (=
> ^[[32m).
> However, these codes don't work within the Cygwin-csh.
>
> Does anyone know the correct sequences here?
> Thanks,
> Jochen =8-)
csh does nothing to interpret the sequences; it simply echoes them. The
sequences are processed by the terminal program (either the console or the
xterm). You only need to make sure the sequences are encoded correctly.
You might want to let some library do the encoding for you depending on
the value of TERM...
Check if the same sequences work from the HPUX bash/sh. If they do, then
look for a problem in the way you encode the sequences in your csh
scripts. If they don't, you're probably echoing the wrong sequences.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/