[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ~/.emacs_bash setting PS1
From: |
Sven Joachim |
Subject: |
Re: ~/.emacs_bash setting PS1 |
Date: |
Tue, 05 Feb 2008 10:09:06 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.90 (gnu/linux) |
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