CentoOS 7 – color terminal

There’s no magical 1 command, you need to do this in steps for each program you would like to use.

Color nano

root@lj: /# git clone https://github.com/nanorc/nanorc.git
root@lj: /# cd nanorc
root@lj: /# make install

And add into ~/.nanorc

include ~/.nano/syntax/html.nanorc
include ~/.nano/syntax/css.nanorc
include ~/.nano/syntax/php.nanorc
include ~/.nano/syntax/ALL.nanorc

Bash color

Add into ~/.bashrc

PS1='\e[33;1m\u@\h: \e[31m\W\e[0m\$ '

Git color

root@lj: /# git config --global color.ui auto

Cat color

This unfortunately isn’t possible. There’s a way around it though.

root@lj: /# yum install python-pygments
root@lj: /# echo "alias dog='pygmentize -g -O style=colorful,linenos=1'" > ~/.bashrc

Write a Comment

Comment