I'm looking for the best way to eliminate the escape sequences displayed in
emacs shell mode. 

example: ---------------------
\[\033]0;\w\007
[EMAIL PROTECTED] \[\033[33m\w\033[0m\]
$ 
------------------------------

It is clear these are from the shell prompt that I believe is being established
by /etc/profile. Here is the code:
------------------------------
        # Set a default prompt of: [EMAIL PROTECTED] and current_directory
        PS1='\[\033]0;\w\007
[EMAIL PROTECTED] \[\033[33m\w\033[0m\]
$ '
------------------------------

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?

Second, assuming that it is not convenient to teach emacs how to handle these
sequences, how best to remove them? I tried creating a .emacs_sh file, that
reset the PS1. This worked, but apparently the .emacs_sh file is executed after
the first prompt display, so there is still the initial prompt display with
these escape sequences.

Finally, whatever the best solution, can we add it to the distribution, so that
a that a fresh install of cygwin does not exhibit this behavior.

-Kelly


--
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/

Reply via email to