瀏覽代碼

ccat added

master
Dirk Alders 1 年之前
父節點
當前提交
67ddb7019f
共有 2 個檔案被更改,包括 4 行新增2 行删除
  1. 4
    0
      .zshrc.d/__available__/ctools.zsh
  2. 0
    2
      .zshrc.d/__available__/logaliases.sh

+ 4
- 0
.zshrc.d/__available__/ctools.zsh 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存