Ccat est une alternative à cat qui affiche les fichiers texte avec coloration syntaxique. Il prend en charge plusieurs langages, notamment JavaScript, Java, Ruby, Python, Go, C et JSON.
Installation sur Arch Linux
yay -S ccat
Installation manuelle
wget https://github.com/jingweno/ccat/releases/download/v1.1.0/linux-amd64-1.1.0.tar.gz tar xfz linux-amd64-1.1.0.tar.gz sudo cp linux-amd64-1.1.0/ccat /usr/local/bin/ sudo chmod +x /usr/local/bin/ccat
Utilisation
Afficher un fichier :
ccat test.txt
Afficher plusieurs fichiers :
ccat test.txt example.txt
Afficher en HTML :
ccat test.txt --html
Afficher la palette de couleurs :
ccat --palette
Personnaliser les couleurs :
ccat -G String="_fuchsia_" -G Plaintext="darkteal" test.txt
Remplacer cat par ccat
Ajoutez un alias dans ~/.bashrc :
alias cat=ccat
Puis rechargez le fichier :
source ~/.bashrc