Browse Source

ccat added

master
Dirk Alders 1 year ago
parent
commit
67ddb7019f
2 changed files with 4 additions and 2 deletions
  1. 4
    0
      .zshrc.d/__available__/ctools.zsh
  2. 0
    2
      .zshrc.d/__available__/logaliases.sh

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

@@ -5,3 +5,7 @@ ctail(){
5 5
 cgrep(){
6 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 7
 }
8
+
9
+ccat(){
10
+    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"
11
+}

+ 0
- 2
.zshrc.d/__available__/logaliases.sh View File

@@ -1,2 +0,0 @@
1
-alias logtail="tail -fn 100 |grep -i -e '^' -e 'warning' -e 'error'"
2
-alias logless="cat | grep -i -e '^' -e 'warning' -e 'error'"

Loading…
Cancel
Save