by ikurei · 1y ago · 0 comments
This will live in my .bashrc for a long time:
cat() {
if [[ -t 1 ]]; then
command cat "$@" | highlight --force -O xterm256
else
# plain cat to pipe into other things
command cat "$@"
fi
}i'd change the third line so you can actually get syntax highlighting:
command highlight --stdout --force -O xterm256 "$@"