Explorar el Código

ctools simplified

master
Dirk Alders hace 1 año
padre
commit
c4f2368eac
Se han modificado 1 ficheros con 6 adiciones y 5 borrados
  1. 6
    5
      .zshrc.d/__available__/ctools.zsh

+ 6
- 5
.zshrc.d/__available__/ctools.zsh Ver fichero

@@ -1,11 +1,12 @@
1
+ccat(){
2
+    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"
3
+}
4
+
1 5
 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"
6
+    tail $* | ccat"
3 7
 }
4 8
 
5 9
 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"
10
+    grep $* | ccat"
7 11
 }
8 12
 
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
-}

Loading…
Cancelar
Guardar