Config File Collection
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ctools.zsh 317B

12345678910111213141516
  1. ccat(){
  2. cat $* | sed -u "s/ERROR/$(tput setaf 1)&$(tput sgr0)/gI"|sed -u "s/WARNING/$(tput setaf 3)&$(tput sgr0)/gI"|sed -u "s/INFO/$(tput setaf 2)&$(tput sgr0)/gI"|sed -u "s/DEBUG/$(tput setaf 6)&$(tput sgr0)/gI"
  3. }
  4. cless(){
  5. ccat $* | less -r
  6. }
  7. ctail(){
  8. tail $* | ccat
  9. }
  10. cgrep(){
  11. grep $* | ccat
  12. }