From 67ddb7019fea755f290b45e184647fc9625ab9e1 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Thu, 31 Aug 2023 18:31:45 +0200 Subject: [PATCH] ccat added --- .zshrc.d/__available__/ctools.zsh | 4 ++++ .zshrc.d/__available__/logaliases.sh | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100755 .zshrc.d/__available__/logaliases.sh diff --git a/.zshrc.d/__available__/ctools.zsh b/.zshrc.d/__available__/ctools.zsh index fd325e3..04560a8 100644 --- a/.zshrc.d/__available__/ctools.zsh +++ b/.zshrc.d/__available__/ctools.zsh @@ -5,3 +5,7 @@ ctail(){ 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" +} diff --git a/.zshrc.d/__available__/logaliases.sh b/.zshrc.d/__available__/logaliases.sh deleted file mode 100755 index 45b9063..0000000 --- a/.zshrc.d/__available__/logaliases.sh +++ /dev/null @@ -1,2 +0,0 @@ -alias logtail="tail -fn 100 |grep -i -e '^' -e 'warning' -e 'error'" -alias logless="cat | grep -i -e '^' -e 'warning' -e 'error'"