From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.help Subject: Re: ~/.emacs_bash setting PS1 Date: Tue, 05 Feb 2008 10:09:06 +0100 Message-ID: <87ejbr93d9.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202224237 13527 80.91.229.12 (5 Feb 2008 15:10:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 15:10:37 +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 05 16:10:59 2008 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.50) id 1JMPRq-000231-3O for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 16:10:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMPRN-0001fu-Rd for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 10:10:29 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!news.ecp.fr!feeder1.cambrium.nl!feed.tweaknews.nl!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!npeer.de.kpn-eurorings.net!npeer-ng2.kpn.DE!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: p54865ac2.dip.t-dialin.net Original-X-Trace: quimby.gnus.org 1202202465 5555 84.134.90.194 (5 Feb 2008 09:07:45 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Tue, 5 Feb 2008 09:07:45 +0000 (UTC) User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.90 (gnu/linux) Cancel-Lock: sha1:Qu1VKr7Q3OKHKwt3ZzHCxv7TDcE= Original-Xref: shelby.stanford.edu gnu.emacs.help:155840 X-Mailman-Approved-At: Tue, 05 Feb 2008 10:10:11 -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:51222 Archived-At: On 2008-02-05 02:41 +0100, Samuel Karl Peterson wrote: > I set my PS1 prompt so that it highlights the hostname portion of my > PS1 string. I use different colors on different hosts so I have a > better visual cue as to which host I'm actually logged into (had some > mishaps in the past with running the wrong command on the wrong > machine). It looks like this: > > export PS1="[\u@\[\033[1;35m\]\h\[\033[0m\] \W]$ " > > Unfortunately, in Emacs shell-mode, this doesn't show up correctly. Do you know you can change that? Quoting (Info "(emacs)Shell Options"): ,---- | If you want Shell mode to handle color output from shell commands, | you can enable ANSI Color mode. Here is how to do this: | | (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) `---- Sven