This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: emacs shell mode prompt with escape sequences "\[\033]0;\w\007"


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]