Emacs – M-x shell color

by

> Any idea how to set the color of the shell prompt in emacs?
>
> Not sure how much of this has to do with my windowing system (Windows
> XP) and shell (putty) or version of emacs and host.

I don’t think you’ll get ANSI color in your Emacs terminal unless you have this:

;; Add color to a shell running in emacs ‘M-x shell’
(autoload ‘ansi-color-for-comint-mode-on “ansi-color” nil t)
(add-hook ‘shell-mode-hook ‘ansi-color-for-comint-mode-on)

Then set the colors:

(custom-set-faces
;; custom-set-faces was added by Custom — don’t edit or cut/paste it!
;; Your init file should contain only one such instance.
‘(comint-highlight-prompt ((t (:foreground “white”)))))

Advertisements

One Response to “Emacs – M-x shell color”

  1. Emacs: cor no “M-x shell” « blogvs gvstavinianvs Says:

    […] Fica perfeito. Dica tirada daqui. […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: