X-Spam-Check-By: sourceware.org Message-ID: <4383BE2B.11B20591@dessent.net> Date: Tue, 22 Nov 2005 16:56:11 -0800 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: escape codes in ksh "\033]0;\$PWD\007\$PWD> " References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com 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 Robert Body wrote: > I have not been able to figure out how to send escape codes to ksh > > I saw a syntax for ksh on > http://www.steveshilling.pwp.blueyonder.co.uk/scripts/xtermtitle.txt > --------- > PS1='^[]0;${USER}@${HOST}: ${PWD}^Gksh$ ' I don't think ksh supports pasrsing of escape characters in environment variables - but you'd have to ask Igor to be sure. That means you have to insert the literal escape character. When you do this most shells will display it as "^[" even though it's actually just one character, which is the source of your confusion. For example, at a bash prompt: PS1='^[[33mYellow! $ ' ksh (where again ^[ is not "^" and "[" but control-v then escape) But what you probably want to do is set this in the .profile or whatever. To do that you'll have to do whatever incantation your chosen text editor uses for inserting raw characters. I think vim uses ^V too - but I don't know because I don't use vim. Brian -- 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/