From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: J Newsgroups: gmane.emacs.help Subject: Re: Shell prompt messed up Date: Sun, 6 Feb 2011 20:17:31 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1297135841 20682 80.91.229.12 (8 Feb 2011 03:30:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Feb 2011 03:30:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 08 04:30:37 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PmeHl-0000Xy-7G for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Feb 2011 04:30:37 +0100 Original-Received: from localhost ([127.0.0.1]:54021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmeHk-0007BR-J8 for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Feb 2011 22:30:36 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: A5FS0TgpAa4iJGldMn35lw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-686 (i686)) X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:184836 X-Mailman-Approved-At: Mon, 07 Feb 2011 22:29:03 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:79019 Archived-At: Have you tried this: by default, Emacs Shell will just print out those ASCII control codes. The omniscient Google pointed out that Emacs can be told to interpret those control codes instead of just printing them out. Two ways to do it: * Within Emacs Shell, M-x ansi-color-for-comint-mode-on, or * Append (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) to ${HOMEDIR}/.emacs. HTH. HAND Michael Kirsch wrote: > [-- text/plain, encoding 7bit, charset: ISO-8859-1, 18 lines --] > > The prompt in the shell (the one that comes up when I enter M-x shell) isn't > right. > > My normal prompt looks like this, and is colored bright green using ANSI > escape codes: > > username:directory$ > > But the prompt looks like this in Emacs: > > ^[]0;username@hostname:/full/path/to/directory^Gusername:directory$ > > The part after the ^G looks like my normal prompt, and still has the bright > green color. The ^[ and ^G are highlighted, so I guess they are > non-printable chars. The part between the ^[ and ^G is dark blue. > > How do I fix it? >