Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Thu, 29 Jan 2004 09:59:52 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: gobo AT gobo-net DOT de cc: cygwin AT cygwin DOT com Subject: Re: csh color codes In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 29 Jan 2004 gobo AT gobo-net DOT 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 AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT 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/