From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Samuel Karl Peterson Newsgroups: gmane.emacs.help Subject: ~/.emacs_bash setting PS1 Date: Mon, 04 Feb 2008 17:41:09 -0800 Organization: University of California, Davis Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202188133 3863 80.91.229.12 (5 Feb 2008 05:08:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 05:08:53 +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 06:09:15 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 1JMG3W-0006xb-Nk for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 06:09:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMG34-0007mA-CT for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 00:08:46 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!ucdavis!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: pc14.cs.ucdavis.edu Original-X-Trace: skeeter.ucdavis.edu 1202175669 6078 169.237.5.55 (5 Feb 2008 01:41:09 GMT) Original-X-Complaints-To: usenet@ucdavis.edu Original-NNTP-Posting-Date: Tue, 5 Feb 2008 01:41:09 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:GGjLxkO+sNqR7EqnBPmU8UAmi7o= Original-Xref: shelby.stanford.edu gnu.emacs.help:155835 X-Mailman-Approved-At: Tue, 05 Feb 2008 00:08:29 -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:51214 Archived-At: 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. I don't need for it to work in shell-mode. The info manual says that shell-mode reads the file ~/.emacs_SHELL depending on the shell used (I use bash). However, placing the above line into the ~/.emacs_bash file doesn't seem to work. Oddly enough, I can type 'exit' and then I'll have a shell with the proper PS1 variable set. Anyone have any advice for me? -- Sam Peterson skpeterson At nospam ucdavis.edu "if programmers were paid to remove code instead of adding it, software would be much better" -- unknown