From 35dd43d9408754b395d848dde308c53486cc5138 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Wed, 30 Aug 2023 11:30:13 +0200 Subject: [PATCH] ctools added for zsh --- .zshrc.d/__available__/ctools.zsh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .zshrc.d/__available__/ctools.zsh diff --git a/.zshrc.d/__available__/ctools.zsh b/.zshrc.d/__available__/ctools.zsh new file mode 100644 index 0000000..fd325e3 --- /dev/null +++ b/.zshrc.d/__available__/ctools.zsh @@ -0,0 +1,7 @@ +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" +}