Next: , Previous: , Up: Common requests   [Contents][Index]

5.47 Why these strange escape sequences from ls from the Shell mode?

In many systems, ls is aliased to ‘ls --color’, which prints using ANSI color escape sequences. Emacs includes the ansi-color package, which lets Shell mode recognize these escape sequences. In Emacs 23.2 and later, the package is enabled by default; in earlier versions you can enable it by typing M-x ansi-color-for-comint-mode in the Shell buffer, or by adding (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) to your init file.