瀏覽代碼

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
     fi
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
 grepr() {
74
 grepr() {
60
     #
75
     #
61
     # Grep recursively, keeping numbers and ignoring common dirs
76
     # Grep recursively, keeping numbers and ignoring common dirs