diff --git a/_bashrc b/_bashrc index f79e0cf..09ed9b8 100644 --- a/_bashrc +++ b/_bashrc @@ -63,5 +63,14 @@ stfu () { alias n='stfu nautilus `pwd`' 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 +}