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

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

~/.emacs_bash setting PS1


From: Samuel Karl Peterson
Subject: ~/.emacs_bash setting PS1
Date: Mon, 04 Feb 2008 17:41:09 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

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


reply via email to

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