Use “bat” replace “cat”, Syntax highlighting

0 Comments

ref: https://github.com/sharkdp/bat

1.1 show file colorfull like vscode.

bat array.c

1.2 install bat

# install bat to mac osx with brew
brew install bat
# install bat to ubuntu
wget https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_amd64.deb
sudo dpkg -i bat_0.24.0_amd64.deb

1.3 config bat as cat

alias cat='bat --paging=never'
echo "alias cat='bat --paging=never'" >> ~/.bashrc

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

AIツール

https://www.pandagpt.io/ PandaGPT is dedicated to make acquiring knowledge as easy as possible