Add colored cat via pygmentize
This commit is contained in:
parent
17dee6721a
commit
0dc788d792
11
_bashrc
11
_bashrc
@ -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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user