Browse Source

ctools added for zsh

master
Dirk Alders 1 year ago
parent
commit
35dd43d940
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      .zshrc.d/__available__/ctools.zsh

+ 7
- 0
.zshrc.d/__available__/ctools.zsh View File

@@ -0,0 +1,7 @@
1
+ctail(){
2
+    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"
3
+}
4
+
5
+cgrep(){
6
+    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"
7
+}

Loading…
Cancel
Save