浏览代码

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
+}

正在加载...
取消
保存