help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GNU Emacs 23.1 and Cygwin bash shell - cleaning up display


From: KARR, DAVID (ATTSI)
Subject: RE: GNU Emacs 23.1 and Cygwin bash shell - cleaning up display
Date: Mon, 1 Mar 2010 09:35:58 -0800

> -----Original Message-----
> From: help-gnu-emacs-bounces+dk068x=att.com@gnu.org [mailto:help-gnu-
> emacs-bounces+dk068x=att.com@gnu.org] On Behalf Of Paul Bibbings
> Sent: Sunday, February 28, 2010 11:17 AM
> To: help-gnu-emacs@gnu.org
> Subject: Re: GNU Emacs 23.1 and Cygwin bash shell - cleaning up
display
> 
> pjb@inf...com (Pascal J. Bourguignon) writes:
> > Paul Bibbings <paul.bibbings@gmail.com> writes:
> >
> >> the equivalent in Emacs renders (After `M-x my-bash' && pwd) as:
> >>
> >>    ^[]0;~^G
> >>    ^[[32mMe@MY ^[[33m~^[[0m
> >>    $ pwd
> >>    /home/Me
> >>    $[]0;~^G
> >>    ^[]0;32mMe@MY ^[[33m~^[[0m
> >>    $
> >>
> >> ... and that is a LOT of noise!

You can create a $HOME/.emacs_bash file, which is used for alternative
settings with Bash in Emacs.  With this, you can set a different prompt
in Emacs than outside of Emacs.

> >>
> >> The encoding for *shell-bash* in this scenario shows as multi-byte
> >> iso-latin-1-dos with DOS-style CRLF.
> >>
> >> Any help in cleaning this up will be very much appreciated.
> >
> > You may activate ansi-color.
> >
> >     M-x ansi-color-for-comint-mode-on RET
> >
> > (You may do that automatically in a hook).
> > However, this deals only with color escapes, not with positionning
> > escapes or others.
> > To avoid these, you may change the prompt.
> > I use:
> >
> >     export PS1='[\u@\h $DISPLAY \W]$ '
> >
> > in my ~/.bashrc
> 
> This is great, Pascal.  Thanks for this.  I have managed to get rid of
> the noise and, also, it triggered me to discover that, having recently
> moved my HOME directory, I had actually omitted to move over my
> .bashrc.  Having done so, and made a few modifications, I'm good now!
> 
> Regards
> 
> Paul Bibbings





reply via email to

[Prev in Thread] Current Thread [Next in Thread]