Add colored cat via pygmentize

This commit is contained in:
Markus Koch 2020-10-25 07:57:10 +01:00
parent 17dee6721a
commit 0dc788d792

11
_bashrc
View File

@ -63,5 +63,14 @@ stfu () {
alias n='stfu nautilus `pwd`' alias n='stfu nautilus `pwd`'
alias ga="git add .;git diff HEAD;git status" alias ga="git add .;git diff HEAD;git status"
alias ccat="pygmentize"
# Colored cat
alias ccat="pygmentize"
alias rcat="/usr/bin/cat"
cat () {
if [[ `file "$1"` =~ .*source.* ]]; then
ccat $@;
else
rcat $@;
fi
}