Skip to content

Instantly share code, notes, and snippets.

@neggles
Forked from cristobal/bashrc_ccze.sh
Last active February 16, 2021 23:08
Show Gist options
  • Save neggles/354c40171f66c32a0117a0ee82c5746f to your computer and use it in GitHub Desktop.
Save neggles/354c40171f66c32a0117a0ee82c5746f to your computer and use it in GitHub Desktop.
Colorize things with CCZE
# CCZE Colourize Config for Ubuntu
# http://lintut.com/colorize-log-files-on-linux-using-ccze-tool/
# http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
CCZE=`which ccze`
if [[ "$TERM" != dumb ]] && [[ -n "$CCZE" ]]; then
function colourify { $@ | $CCZE -A; }
alias colourify=colourify
alias configure='colourify ./configure'
alias diff='colourify diff'
alias make='colourify make'
alias gcc='colourify gcc'
alias g++='colourify g++'
alias as='colourify as'
alias gas='colourify gas'
alias ld='colourify ld'
alias netstat='colourify netstat'
alias ping='colourify ping'
alias traceroute='colourify /usr/sbin/traceroute'
function journalctlc { SYSTEMD_PAGER='$CCZE -A -o nolookups | less' journalctl $@; }
alias journalctlc=journalctlc
function journalctlcf { journalctl -xfen 500 $@ | ccze -A -o nolookups; }
alias journalctlcf=journalctlcf
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment