From c4f2368eac2a742b29487754072e1d9c5ad08fb7 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Thu, 31 Aug 2023 18:39:58 +0200 Subject: [PATCH] ctools simplified --- .zshrc.d/__available__/ctools.zsh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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" +} +