浏览代码

Add grepcl() for grepping common (IRC) chat logs

Alois Mahdal 7 年前
父节点
当前提交
e1e744c483
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15
    0
      dotfiles/bash/main.bashrc

+ 15
- 0
dotfiles/bash/main.bashrc 查看文件

@@ -56,6 +56,21 @@ git() {
56 56
     fi
57 57
 }
58 58
 
59
+grepcl() {
60
+    #
61
+    # Grep in common chat log files
62
+    #
63
+    # The order is from older apps to newer as I was moving towards
64
+    # weechat.
65
+    #
66
+    grep "$@" -r \
67
+        "$HOME/.config/xchat2/xchatlogs" \
68
+        "$HOME/.config/xchat2/scrollback" \
69
+        "$HOME/.config/hexchat/logs" \
70
+        "$HOME/.config/hexchat/scrollback" \
71
+        "$HOME/.weechat/logs"
72
+}
73
+
59 74
 grepr() {
60 75
     #
61 76
     # Grep recursively, keeping numbers and ignoring common dirs