cygwin bash does not display correctly in emacs shell cygwin bash does not display correctly in emacs shell bash bash

cygwin bash does not display correctly in emacs shell


Add this to your init:

(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)

As for your other message, I've started getting that myself only recently. I've run emacs/cygwin/bash for a while, and I'm not sure yet what caused it.


If nothing else works, you can customise your shell prompt for the case when you are running M-x shell by making use of the following functionality:

M-: (info "(emacs) Interactive Shell") RET

Emacs sends the new shell the contents of the file ~/.emacs_SHELLNAME' as input, if it exists, where SHELLNAME is the name of the file that the shell was loaded from. For example, if you use bash, the file sent to it is~/.emacs_bash'. If this file is not found, Emacs tries with `~/.emacs.d/init_SHELLNAME.sh'.

So you can specify a prompt without colour codes in that file (i.e. set the PS1 environment variable).