瀏覽代碼

ctools added for zsh

master
Dirk Alders 1 年之前
父節點
當前提交
35dd43d940
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      .zshrc.d/__available__/ctools.zsh

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

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