syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.56k stars 4.9k forks source link

Enhance the eshell with its built-in ansi-color support #16377

Closed sunlin7 closed 1 month ago

sunlin7 commented 2 months ago

Hi,

The Eshell works with ansi-color on both Emacs-29 and Emacs-30, don't bother the xterm-color package. So move the the xterm-color initialization code to its initialization function.

This patch will let the Eshell works with most terminal tools colorful, for example, these command lines will work great in the eshell: $ /bin/ls --color=tty $ /bin/git status # with git config color.ui always

Please help review the changes. Thanks.