mirror of
https://github.com/Linux4Yourself/book.git
synced 2025-01-24 06:52:20 +08:00
15 lines
384 B
Bash
15 lines
384 B
Bash
cat > /etc/profile.d/dircolors.sh << "EOF"
|
|
# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
|
|
if [ -f "/etc/dircolors" ] ; then
|
|
eval $(dircolors -b /etc/dircolors)
|
|
fi
|
|
|
|
if [ -f "$HOME/.dircolors" ] ; then
|
|
eval $(dircolors -b $HOME/.dircolors)
|
|
fi
|
|
|
|
alias ls='ls --color=auto'
|
|
alias grep='grep --color=auto'
|
|
EOF
|
|
dircolors -p > /etc/dircolors
|