跳到主要内容

grc

提示

grc依赖python3

作用

加强Linux颜色显示,效果如下

iShot_2024-08-21_21.55.22

grc github地址

1.下载源码

git clone https://github.com/garabik/grc.git

2.执行安装脚本、拷贝文件

# 执行安装脚本
cd grc
sh install.sh

# 拷贝文件
cp grc.sh /etc

3.设置别名

3.1 Bash

~/.bashrc 写入以下内容

cat >> ~/.bashrc << EOF
GRC_ALIASES=true
[[ -s "/etc/profile.d/grc.sh" ]] && source /etc/grc.sh
EOF

加载生效

source ~/.bashrc

3.2 ZSH

~/.zshrc 写入以下内容

[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh

加载生效

source ~/.zshrc