Emacs Shell Garbage

What Is That?

If start a shell buffer in Emacs, you may find garbage printed onscreen instead of a listing of files and directories. This is a problem with ansi color settings.

From Emacs manual:

"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)

Fixing the problem requires adding the above line to your .emacs init file.

Its that simple!