diff --git a/.zshrc.d/__available__/ctools.zsh b/.zshrc.d/__available__/ctools.zsh index 04560a8..3c4e494 100644 --- a/.zshrc.d/__available__/ctools.zsh +++ b/.zshrc.d/__available__/ctools.zsh @@ -1,11 +1,12 @@ -ctail(){ - tail $* | 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" -} - -cgrep(){ - grep $* | 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" -} - ccat(){ 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" } + +ctail(){ + tail $* | ccat" +} + +cgrep(){ + grep $* | ccat" +} +