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 Message-ID: <4226452D.598BD3C4@dessent.net> Date: Wed, 02 Mar 2005 14:58:53 -0800 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: emacs shell mode prompt with escape sequences "\[\033]0;\w\007" References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Kelly Felkins wrote: > At the risk of exposing my ignorance of shell initialization, I'm not sure how > best to fix this. > > First, I think the issue is that the emacs shell does not know how to interpret > these sequences. Can emacs be configured to correct this? I think that it's a sh-vs-bash thing. sh does not know how to handle the escape sequences, but bash does. So any interactive shell started as /bin/sh will display them. For example, if you just type "rxvt &" you will get them because rxvt invokes /bin/sh if you don't tell it otherwise. The solution is probably just to tell emacs to create a shell by obeying $SHELL (which should be /bin/bash) and not by calling /bin/sh. I know nothing about emacs though. Perhaps a cleaner solution would be to modify the stock /etc/profile to detect whether it is running under bash or sh, and create an appropriate prompt. I don't know who's maintaining the base-files package or whether he/she's interested in looking into this. 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/